Error Unable To Open Config File /etc/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 Use
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 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 https://lists.oetiker.ch/pipermail/mrtg/2011-May/036526.html 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 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 https://ubuntuforums.org/archive/index.php/t-829021.html 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 five minutes or so and then take a look at your summary home page. If your Debian system's IP address is 172.16.0.20 then you'd type in the following in the address bar of a browser running on a system on the same network: http://172.16.0.20/mrtg/ Your summary home page should come up with a graph for each target entry in the configuration file. If a graph looks like there's no data on it, click on it and check the statistics to see if any traffic is being seen. Small amounts of traffic won't show up on the graphs because we used the Unscaled
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help https://www.experts-exchange.com/questions/22671990/MRTG-ERROR-in-CFG-file-does-not-make-sense.html Create a Freelance Project Hire for a Full Time Job Ways to http://www.cyberciti.biz/faq/centos-fedora-linux-multi-router-traffic-grapher-tutorial/ Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > MRTG: ERROR: in CFG file does not make sense Want to Advertise Here? Solved MRTG: ERROR: in CFG file error unable does not make sense Posted on 2007-07-02 Linux Networking 1 Verified Solution 5 Comments 2,592 Views Last Modified: 2012-08-14 Hi Gentlemen I've installed MRTG on Centos 4.5 and get an output at localhost :http://localhost/mrtg Now to add a router to view it statisctics, i did /usr/local/mrtg-2/bin/cfgmaker communityname@router1 >/var/www/html/mrtg/core/router1.cfg and it succesfully created a .cfg i edited my router1.cfg error unable to workdirectory as /var/www/html/switches To create a page I did Indexmaker like : /usr/local/mrtg-2/bin/indexmaker /var/www/html/router/switch1.html> /var/www/html/mrtg/core/router1.cfg and it gives : ERROR: Line 8 ( WorkDir: /var/www/html/switch1) in CFG file (/var/www/html/mrtg/core/router1.cfg) does not make sense I tried doing workdirectory as /var/www/html/mrtg/switch aslo and several other options but does'nt seem to work well. Please advise 0 Question by:appleharry Facebook Twitter LinkedIn Google LVL 57 Active today Best Solution bygiltjr O.K. Your command is not working because it is the wrong format of the command. I also believe you may have some issues because you seem to be mixing your directories a bit. Try the following command, Go to Solution 5 Comments LVL 57 Overall: Level 57 Linux Networking 9 Message Active today Expert Comment by:giltjr2007-07-02 Are you sure you entered the command: /usr/local/mrtg-2/bin/indexmaker /var/www/html/router/switch1.html> /var/www/html/mrtg/core/router1.cfg This means the indexmaker will attept to read the file switch1.html for configuration parameters and create router1.cfg as the html page. Based on what I normally use you should be using: /usr/local/mrtg-2/bin/indexmaker /var/www/html/mrtg/core/router1.cfg -output=/var/www/html/router/switch1.html 0 Message Author Comment b
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::ipAdE