Error Unable To Open Config File /etc/mrtg/mrtg.conf
] [ 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
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 http://mrtg.oetiker.narkive.com/uQLriIQA/error-workdir-not-specified-in-mrtg-config-file the following info:# 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: /home/http/mrtg# or for http://www.cyberciti.biz/faq/centos-fedora-linux-multi-router-traffic-grapher-tutorial/ 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[_]: error unable growright,bits######################################################################then:[***@kuto3 ~]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfgAnd then:[***@kuto3 ~]# 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//) error unable to 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 list archive at Nabble.com. Eric Brander 2011-05-06 13:45:48 UTC PermalinkRaw Message In my experience you must put the "--output=" parameter last. It's been awhile though so I could be mistaken. kutasheax 2011-05-07 09:49:34 UTC PermalinkRaw Message I got the problem sorted out while i was reading documentation on this siteregarding indexmaker and cfgmaker.Here's what i did based following the sample presented on this site.Using cfgmaker, i need to recreate my previous commands based on examplecfg
Networking, Package Management, RedHat and Friends, Security, Troubleshooting, UNIXHow do I install and configure MRTG under Fedora Linux or CentOS Linux v5.x server to monitor the traffic load on network-links including routers? The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network-links. MRTG generates HTML pages containing PNG images which provide a LIVE visual representation of this traffic. You need the following packages:
mrtg : Multi Router Traffic Graphernet-snmp and net-snmp-utils : SNMP (Simple Network Management Protocol) is a protocol used for network management. The NET-SNMP project includes various SNMP tools. net-snmp package contains the snmpd and snmptrapd daemons, documentation, etc. You also want to install the net-snmp-utils package, which contains NET-SNMP utilities.This FAQ works with RHEL / CentOS and Fedora Linux.Step # 1: Install MRTGType the following command to install packages using yum command under CentOS / Fedora Linux: # yum install mrtg net-snmp net-snmp-utilsStep # 2: Configure snmpdIf you need to monitor localhost including interface and other stuff such as CPU, memory etc, configure snmpd. Open /etc/snmp/snmpd.conf, enter: # vi /etc/snmp/snmpd.conf Update it as follows to only allow access from localhost:com2sec local localhost public group MyRWGroup v1 local group MyRWGroup v2c local group MyRWGroup usm local view all included .1 80 access MyRWGroup "" any noauth exact all all none syslocation VSNL, India syscontact Root# service snmpd restart Make sure you see interface IP, by running the following command: # snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex Sample Outputs:IP-MIB::ipAdEntIfIndex.123.xx.yy.zzz = INTEGER: 2 IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1Step # 3: Configure MRTGUse cfgmaker command to creates /etc/mrtg/mrtg.cfg file, enter: # cfgmaker --global 'WorkDir: /var/www/mrtg' --output /etc/mrtg/mrtg.cfg public@localhost-global ‘WorkDir: /var/www/mrtg' : add global config entries i.e. set workdir to store MRTG graphs.-output /etc/mrtg/mrtg.cfg: configr output filenamepublic@localhost : public is the community name o