MRTG: Reload Ok file on Ubuntu Server
I had a problem with an MRTG server while graphing the interface use on a Cisco 2600 & another 2800 router, out of the blue, the MRTG started to graph a completely pegged interface, and printing errors such as this when "executed by hand" from the CLI:
After Googling for a while the error message, all the references pointed towards of "getting rid of the '*.ok' files", but since I had none of those on my system that I could tell, what I did was renaming the file for that particular device on the directory defined on the directive 'ThreshDir':
After that, it started to work A Ok once again...
The files did actually changed, the original looked like this:
While the new one, automagically generated right after the first MRTG run, looks like this:
WARNING: Can not determine ifNumber for xxxx@XXX.XXX.XXX.XXX: ref: 'Name' key: 'Et0/0'
WARNING: Can not determine ifNumber for xxxx@XXX.XXX.XXX.XXX: ref: 'Name' key: 'Se0/0'
WARNING: Can not determine ifNumber for xxxx@XXX.XXX.XXX.XXX: ref: 'Name' key: 'Se0/0.240'
ERROR: Target[XXX.XXX.XXX.XXX_et0_0][_IN_] ' $target->[1]{$mode} ' did not eval into defined data
ERROR: Target[XXX.XXX.XXX.XXX_et0_0][_OUT_] ' $target->[1]{$mode} ' did not eval into defined data
ERROR: Target[XXX.XXX.XXX.XXX_se0_0][_IN_] ' $target->[2]{$mode} ' did not eval into defined data
ERROR: Target[XXX.XXX.XXX.XXX_se0_0][_OUT_] ' $target->[2]{$mode} ' did not eval into defined data
ERROR: Target[XXX.XXX.XXX.XXX_se0_0.240][_IN_] ' $target->[3]{$mode} ' did not eval into defined data
ERROR: Target[XXX.XXX.XXX.XXX_se0_0.240][_OUT_] ' $target->[3]{$mode} ' did not eval into defined data
After Googling for a while the error message, all the references pointed towards of "getting rid of the '*.ok' files", but since I had none of those on my system that I could tell, what I did was renaming the file for that particular device on the directory defined on the directive 'ThreshDir':
sudo mv /var/lib/mrtg/_etc_mrtg_cfgs_xxxxxx.+++++++++.cfg /var/lib/mrtg/_etc_mrtg_cfgs_xxxxxx.+++++++++.cfg.OLD
After that, it started to work A Ok once again...
The files did actually changed, the original looked like this:
xxxx@XXX.XXX.XXX.XXX_ Descr Ethernet0/0 1
xxxx@XXX.XXX.XXX.XXX_ Descr Null0 3
xxxx@XXX.XXX.XXX.XXX_ Descr Serial0/0 2
xxxx@XXX.XXX.XXX.XXX_ Descr Serial0/0.240 4
xxxx@XXX.XXX.XXX.XXX_ Ip XXX.XXX.XXX.XXX 1
xxxx@XXX.XXX.XXX.XXX_ Name Et0/0
xxxx@XXX.XXX.XXX.XXX_ Name Nu0 3
xxxx@XXX.XXX.XXX.XXX_ Name Se0/0
xxxx@XXX.XXX.XXX.XXX_ Name Se0/0.240
xxxx@XXX.XXX.XXX.XXX_ Type 32 2
xxxx@XXX.XXX.XXX.XXX_ Type 6 1
While the new one, automagically generated right after the first MRTG run, looks like this:
xxxx@XXX.XXX.XXX.XXX_ Descr Ethernet0/0 1
xxxx@XXX.XXX.XXX.XXX_ Descr Null0 3
xxxx@XXX.XXX.XXX.XXX_ Descr Serial0/0 2
xxxx@XXX.XXX.XXX.XXX_ Descr Serial0/0.240 4
xxxx@XXX.XXX.XXX.XXX_ Eth Dup
xxxx@XXX.XXX.XXX.XXX_ Eth xx-xx-x-x-x-x-x-x-x-x-x-x-x-x 1
xxxx@XXX.XXX.XXX.XXX_ Ip XXX.XXX.XXX.XXX 1
xxxx@XXX.XXX.XXX.XXX_ Ip 10.16.254.22 4
xxxx@XXX.XXX.XXX.XXX_ Name Et0/0 1
xxxx@XXX.XXX.XXX.XXX_ Name Nu0 3
xxxx@XXX.XXX.XXX.XXX_ Name Se0/0 2
xxxx@XXX.XXX.XXX.XXX_ Name Se0/0.240 4
xxxx@XXX.XXX.XXX.XXX_ Type 1 3
xxxx@XXX.XXX.XXX.XXX_ Type 32 Dup
xxxx@XXX.XXX.XXX.XXX_ Type 6 1
Labels: IT slaves, Linux, Monitoring, Network monitoring, Ubuntu
1 Comments:
Same problem here with a Juniper SSG series router.
Renaming the appropriate cfg file in /var/lib/mrtg/ solved the problem when the new one was auto created on the next run.
Many Thanks
Post a Comment
<< Home