Error Unable To Open Config File /etc/mrtg/mrtg.cfg
] [ author ] Hi all, I am having problem installing mrtg on RHEL6 The commands I followed are the following: /usr/bin/cfgmaker --output=/etc/mrtg/mrtg.cfg --global "WorkDir: /var/www/mrtg" --global "options[_]: growright,bits" snmpo at 192.168.0.197 it creates the mrtg.cfg with the following info: # Created by # /usr/bin/cfgmaker --output=/etc/mrtg/mrtg.cfg --global "WorkDir: /var/www/mrtg" --global "options[_]: growright,bits" snmpo at 192.168.0.197 ### Global Config Options # for UNIX # WorkDir: /home/http/mrtg # or for NT # WorkDir: c:\mrtgdata ### Global Defaults # to get bits instead of bytes and graphs growing to the right # Options[_]: growright, bits EnableIPv6: no WorkDir: /var/www/mrtg options[_]: growright,bits ###################################################################### then: [root at kuto3 ~]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg And then: [root at kuto3 ~]# indexmaker /var/www/mrtg/index.html /etc/mrtg/mrtg.cfg ERROR: unable to open config file: /var/www/mrtg/index.html [root at kuto3 ~]# touch /var/www/mrtg/index.html [root at kuto3 ~]# chmod 777 /var/www/mrtg/index.html This is where the problem start when i populate /var/www/mrtg [root at kuto3 ~]# indexmaker /var/www/mrtg/index.html /etc/mrtg/mrtg.cfg Use of uninitialized value $first in pattern match (m//) at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 611. ERROR: "WorkDir" not specified in mrtg config file I dont know where the problem is coming from as my directives are found in my mrtg.cfg [root at kuto3 ~]# rpm -qa | grep -i mrtg mrtg-libs-2.16.2-5.el6.i686 mrtg-2.16.2-5.el6.i686 [root at kuto3 ~]# rpm -qa | grep -i snmp net-snmp-utils-5.5-27.el6.i686 net-snmp-libs-5.5-27.el6.i686 net-snmp-5.5-27.el6.i686 perl-SNMP_Session-1.12-4.el6.noarch [root at kuto3 ~]# I need help on solving problem =(( Thanks. -- View this message in context: http://mrtg-mailinglists.795376.n2.nabble.com/ERROR-WorkDir-not-specified-in-mrtg-config-file-tp6337483p6337483.html Sent from the MRTG Users Mailinglist mailing list archive at Nabble.com. Next message: [mrtg] ERROR: "WorkDir" not specified in mrtg config file Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] More information about the mrtg mailing list
• All times are UTC - 6 hours [ DST ] Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
2008, 04:13 PMI have been looking for a way to monitor the amount of data I transfer on a monthly basis (see https://ubuntuforums.org/archive/index.php/t-829021.html thread http://ubuntuforums.org/showthread.php?t=817047). The reason for this is because I am capped at https://www.howtoforge.com/community/threads/check_mrtgtraf-unable-to-open-mrtg-log-file.48484/ 100Gbs up/down combined, and I wanna make sure that every month I don't go overboard with downloading. In my previous thread (above), someone recommended that I use Nagios. Managed to install the whole thing, works like a charm. But when I got to monitoring router traffic, I saw that error unable Nagios needed to run with MRTG (http://oss.oetiker.ch/mrtg/doc/mrtg-unix-guide.en.html). So I went ahead and took a look at what the documentation said. I can't understand a word of this. The Nagios instructions were step-by-step, the best I've seen. So I tried looking inside Synaptic and found the mrtg packages. Downloaded, installed all is good, but I don't even know where to start using error unable to it: not sure if the daemon is running, not sure how to access the graph, how to configure the cfg file (or where it is for that matter). If anyone has MRTG running on Hardy, please either point me to the right thread or post the documentation here. I would be very greatful! couzin2000July 4th, 2008, 12:09 PMI found this file going on about MRTG, in a Debian help site: http://www.debianhelp.co.uk/mrtg.htm. This seems to be the best help for me right now. There are a few snafus I've encountered. In the text I read as follows: Now you need to restart the snmp service #/etc/init.d/snmpd restart The configuration file creating using #cfgmaker public@localhost > /etc/mrtg.cfg Creating a configuration file for a device using #cfgmaker public@192.168.0.1 >> /etc/mrtg.cfg With the configuration file created correctly there's only one other thing you have to do and that's to use the indexmaker utility to create the summary home page. Since you have to re-run this command every time you make certain changes to the /etc/mrtg.cfg configuration file, Creating index file for the webserver using
1 of 2 1 2 Next > gads New Member hi, I have installed nagios on centOS and I monitor switch but the Port1 Bandwidth Usage has this error "check_mrtgtraf: Unable to open MRTG log file ". I had already installed mrtg but it has the same error. do anyone can help me about this problem? thanks in advance... here is the script of my switch.cfg: define service{ use generic-service ; Inherit values from a template host_name distributed_switch service_description Port 1 Bandwidth Usage check_command check_local_mrtgtraf!/var/lib/mrtg/192.168.1.253_1.log!AVG!1000000,1000000!5000000,5000000!10 } gads, Sep 2, 2010 #1 Mark_NL New Member Code: ls -al /var/lib/mrtg/192.168.1.253_1.log Code: ps flax | grep nagios Mark_NL, Sep 2, 2010 #2 gads New Member thanks for the reply Mark_NL, when I try the code you gave this is the result: [[emailprotected] ~]# ls -al /var/lib/mrtg/192.168.1.253_1.log ls: /var/lib/mrtg/192.168.1.253_1.log: No such file or directory [[emailprotected] ~]# ps flax | grep nagios 0 0 18909 12276 17 0 3916 664 stext S+ pts/0 0:00 | \_ grep nagios 1 100 2860 1 18 0 6780 484 335550 Ss ? 0:00 /usr/sbin/ndo2db -c /etc/nagios/ndo2db.cfg 1 100 16191 2860 15 0 6780 1268 - S ? 0:01 \_ /usr/sbin/ndo2db -c /etc/nagios/ndo2db.cfg 1 100 16188 1 15 0 13716 984 stext Ssl ? 0:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg I wonder what is 192.168.1.253_1.log because when i go to /var/lib/mrtg/ directory, it is not there? what should i do about this? thanks in advance.. gads, Sep 2, 2010 #3 Mark_NL New Member what IS in that mrtg dir? Code: ls -al /var/lib/mrtg/ Mark_NL, Sep 2, 2010 #4 kheimbuch New Member Hey Mark I am having the same problem as Gads. The only file I have in the /var/lib/mrtg/ directory is: _etc_mrtg.cfg kheimbuch, Sep 2, 2010 #5 gads New Member hi Mark, thanks for the reply, sorry for the late response... here is the result of the command " ls -al /var/lib/mrtg/ " : [[emailprotected] ~]# ls -al /var/lib/mrtg/ total 12 drwxr-xr-x 2 root root 4096 Jan 10 2007 . drwxrwxr-x 22 apache nagios 4096 Sep 1 13:21 .. -rw-r--r-- 1 nagios nagios 0 Sep 3 10:15 mrtg.ok [[emailprotected] ~]# what should I do next? thanks in advance... gads, Sep 3, 2010 #6 falko Super Moderator ISPConfig Developer Can you try Code: chown nagios:nagios /var/lib/mrtg/ ? falko, Sep 3, 2010 #7 kheimbuch New Member Nothing for me. Still the same error. I had even tried creating the file itself and giving nagios full access to it. kheimbuch, Sep 3, 2010 #8 falko Super