Error Unable To Open Config File 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
2008, 04:13 PMI have been looking for a way to monitor the amount of data I transfer on a monthly basis (see thread http://ubuntuforums.org/showthread.php?t=817047). The reason for this is because I am capped at 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 Nagios needed to run https://lists.oetiker.ch/pipermail/mrtg/2011-May/036526.html 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 it: not sure if the daemon https://ubuntuforums.org/archive/index.php/t-829021.html 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 #indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html Now you need to reboot your system wait for
the following:/usr/bin/cfgmaker --output=/etc/mrtg/mrtg.cfg --global "WorkDir:/var/www/mrtg" --global "options[_]: growright,bits" ***@192.168.0.197it creates the mrtg.cfg with the following info:# http://subnets.ru/forum/viewtopic.php?f=6&t=17&start=10 Created by# /usr/bin/cfgmaker --output=/etc/mrtg/mrtg.cfg --global "WorkDir:/var/www/mrtg" --global "options[_]: growright,bits" ***@192.168.0.197### Global Config Options# for UNIX# WorkDir: error unable /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, bitsEnableIPv6: noWorkDir: /var/www/mrtgoptions[_]: growright,bits######################################################################then:[***@kuto3 ~]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfgAnd then:[***@kuto3 error unable to ~]# indexmaker /var/www/mrtg/index.html /etc/mrtg/mrtg.cfgERROR: unable to open config file: /var/www/mrtg/index.html[***@kuto3 ~]# touch /var/www/mrtg/index.html[***@kuto3 ~]# chmod 777 /var/www/mrtg/index.htmlThis is where the problem start when i populate /var/www/mrtg[***@kuto3 ~]# indexmaker /var/www/mrtg/index.html /etc/mrtg/mrtg.cfgUse 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 fileI dont know where the problem is coming from as my directives are found inmy mrtg.cfg[***@kuto3 ~]# rpm -qa | grep -i mrtgmrtg-libs-2.16.2-5.el6.i686mrtg-2.16.2-5.el6.i686[***@kuto3 ~]# rpm -qa | grep -i snmpnet-snmp-utils-5.5-27.el6.i686net-snmp-libs-5.5-27.el6.i686net-snmp-5.5-27.el6.i686perl-SNMP_Session-1.12-4.el6.noarch[***@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.htmlSent from the MRTG Users Mailinglist mailing