[mrtg] Re: error writing .ok file

Daniel R . Kilbourne drk at voyager.net
Sun Sep 30 21:12:19 MEST 2001


Some .ok files will be empty, most will not.


example: here is my (munged) router.ok:


community at 10.10.10.10: Descr   Ethernet0       2
community at 10.10.10.10: Descr   Ethernet1       3
community at 10.10.10.10: Descr   Null0   4
community at 10.10.10.10: Descr   Serial0 1
community at 10.10.10.10: Eth             Dup
community at 10.10.10.10: Eth     00-e0-1e-cb-46-8c       2
community at 10.10.10.10: Eth     00-e0-1e-cb-46-8d       3
community at 10.10.10.10: Ip      10.10.10.145  2
community at 10.10.10.10: Ip      10.10.10.241  3
community at 10.10.10.10: Ip      10.10.10.10  2
community at 10.10.10.10: Ip      10.10.10.10   1
community at 10.10.10.10: Name    Et0     2
community at 10.10.10.10: Name    Et1     3
community at 10.10.10.10: Name    Nu0     4
community at 10.10.10.10: Name    Se0     1
community at 10.10.10.10: Type    1       4
community at 10.10.10.10: Type    32      1
community at 10.10.10.10: Type    6       Dup


Several things here, but mainly the purpose of the .ok file is for mrtg to know if everything is "ok."

Here is how (in my understanding, please correct me if wrong anyone).


The list of items is the things monitored in that config. In the previous example, I have a Cisco 1605, therefore I have
2 ethers, 1 serial, and one Null interface in my config. 

Now, the info on the right corresponds to the ifindex mrtg uses to monitor the perticular interfaces.

So, if sometthing were to change on the router (say you added/removed interfaces), and the router decided to remap
the snmp ifindexes (such as an older IOS or if you do not have 'snmp ifindex persist' option set), mrtg will check what the router currently has to the info in the .ok file. If it notices an issue, it will notify you, therefore letting you know that the ifindexes you have may/may not be wrong. A pretty snazzy feature IMHO.




Wes Hall extolled:
> 
> I'm getting an error while running mrtg config files from a restricted directory.
> 
> ERROR: writing /opt2/etc/mrtg/network/xxx.xxx.xxx.xx.ok.ok: Permission denied at /opt2/bin/../lib/mrtg2/MRTG_lib.pm line 1171.
> 
> If I allow the group/user to write permissions there is no problem.  I thought this might be a lock file but that is being placed in tmp.
> 
>  mrtg /opt2/etc/mrtg/network/xxx.xxx.xxx.xx.cfg --lock-file=/tmp/lock
> 
> What is the .ok file?  It appears to be empty.
> Is there any way to put it in another directory or just keep it from being produced?
> I have named my config files mrtg.switches, mrtg.servers, mrtg.routers,etc since only one .ok files is produced is this causing any problems?( doesn't appear to be)
> 
> Why isn't it deleted after mrtg runs?
> 
> 
> I have checked the manpage for mrtg and didn't see mention and the FAQ site has been done.
> 
> version: MRTG 2.9.17
> 
> Thanks wes
> 
> 
> 
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://www.ee.ethz.ch/~slist/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
> 

-- 
--------------------------------
Daniel R. Kilbourne
daniel.kilbourne at corecomm.com
CoreComm Systems Engineering
________________________________

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list