Mrtg statistics not updating

6854933580_2c8b688306_z

*/1 * * * * root if [ -x /usr/bin/mrtg ] && [ -r /etc/] && [ -d "$(grep '^:space:*Work Dir' /etc/| awk '')" ]; then mkdir -p /var/log/mrtg ; env LANG=C /usr/bin/mrtg /etc/--debug="time,log" 2 Please note that I added debug option "time,log" to help troubleshoot. But when I tried with the rrdtool fetch, it still shows 5 minute data.. rrdtool fetch 192.168.1.40_24AVERAGE -a -s -1h -r 1m -a ds010500: 1.0150000000e 04 1.0158466667e 04 1479010800: 1.0150000000e 04 1.0158466667e 04 1479011100: 1.0145166667e 04 1.0153661556e 04 1479011400: 1.0021447006e 04 1.0029884972e 04 1479011700: 5.8127796610e 03 5.8212468060e 03 1479012000: 5.7859754098e 03 5.7944147796e 03 1479012300: 5.8089454941e 03 5.8174389793e 03 1479012600: 5.8006990960e 03 5.8091662411e 03 1479012900: 5.8047527778e 03 5.8132194444e 03 1479013200: 5.7812226321e 03 5.7896620018e 03 1479013500: 5.7946912568e 03 5.8031847421e 03 1479013800: 5.8049794444e 03 5.8134465895e 03 1479014100: -nan -nan in the RRD file.In my /var/log/mrtg/mrtg.log, I see the data is logged every one minute as expected, however it does not try to calculate the throughput every minute. However, the likely cause is that you originally created the RRD file with a 5min interval, and then changed to a 1min interval later.The following messages appear: 2010-10-20 : WARNING: could not match&get xxxx/if In Octets for Descr 'eth0' 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't remove xxxx.1updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't rename xxxx.1to leela.1updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't rename xxxx.1to leela.1updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't rename xxxx.1to leela.1updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup could not read the primary log file for xxxx.1 2010-10-20 , Rateup ERROR: /usr/bin/rateup found that xxxx.1's log file time of 1287551163 was greater than now (1287550862) ERROR: Let's not do the time warp, again. 2010-10-20 , Rateup WARNING: /usr/bin/rateup could not read the primary log file for xxxx.1 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't rename xxxx.1to leela.1updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't remove xxxx.1updating log file 2010-10-20 , Rateup ERROR: /usr/bin/rateup found that xxxx.1's log file time of 1287553563 was greater than now (1287551763) ERROR: Let's not do the time warp, again. 2010-10-20 , Rateup ERROR: /usr/bin/rateup found that xxxx.1's log file time of 1287553563 was greater than now (1287552665) ERROR: Let's not do the time warp, again. 2010-10-20 , Rateup ERROR: /usr/bin/rateup found that xxxx.1's log file time of 1287553862 was greater than now (1287546362) ERROR: Let's not do the time warp, again. 2010-10-20 , Rateup ERROR: /usr/bin/rateup found that xxxx.1's log file time of 1287553862 was greater than now (1287553263) ERROR: Let's not do the time warp, again. 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't remove xxxx.2updating log file 2010-10-20 , Rateup ERROR: /usr/bin/rateup found that xxxx.1's log file time of 1287553862 was greater than now (1287547562) ERROR: Let's not do the time warp, again. 2010-10-20 , Rateup ERROR: /usr/bin/rateup found that xxxx.2's log file time of 1287551163 was greater than now (1287546362) ERROR: Let's not do the time warp, again. 2010-10-20 , Rateup ERROR: /usr/bin/rateup found that xxxx.1's log file time of 1287553862 was greater than now (1287549963) ERROR: Let's not do the time warp, again. 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't rename xxxx.2to leela.2updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't rename xxxx.2to leela.2updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't rename xxxx.2to leela.2updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't remove xxxx.2updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't rename xxxx.2to leela.2updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup Can't rename xxxx.2to leela.2updating log file 2010-10-20 , Rateup WARNING: /usr/bin/rateup could not read the primary log file for xxxx.2 2010-10-20 , Rateup WARNING: /usr/bin/rateup The backup log file for xxxx.2 was invalid as well 2010-10-20 , ERROR: Step Time does not match Avc 900. 2010-10-20 , ERROR: Step Time does not match Avc -600. 2010-10-20 , ERROR: Step Time does not match Avc -2100. 2010-10-20 , ERROR: Step Time does not match Avc -3600. 2010-10-20 , ERROR: Step Time does not match Avc -5100. 2010-10-20 , ERROR: Step Time does not match Avc -6600. 2010-10-20 , ERROR: Step Time does not match Avc -8100. 2010-10-20 , ERROR: Step Time does not match Avc -9600. 2010-10-20 , ERROR: Step Time does not match Avc -11100. You have a router, you want to know what it does all day long? It will monitor SNMP network devices and draw pretty pictures showing how much traffic has passed through each interface. MRTG is being used to graph all sorts of network devices as well as everything else from weather data to vending machines. If you have been looking for something more than the documentation included with MRTG, this might be just what you have been waiting for. Just download it and follow the install instructions for Unix/Linux or Windows or Net Ware to get get started. When I first updated the system I didn't copied from the begining all the images from /var/www/html/mrtg so they started to be generated and I also ran a cfgmaker to creat the new file.Then I copied my old file and also all the day, week, month and year pictures into /var/www/html/mrtg and I ran a indexmaker command to make the change happen and it does for one day.MRTG is written in perl and works on Unix/Linux as well as Windows and even Netware systems. Steve is publishing the book via Lulu, so you can get an actual printed and bound copy. If you run into trouble, check out support options. You want to encourage me to spend my time, working on it?

||

*/1 * * * * root if [ -x /usr/bin/mrtg ] && [ -r /etc/] && [ -d "$(grep '^:space:*[^#]*:space:*Work Dir' /etc/| awk '')" ]; then mkdir -p /var/log/mrtg ; env LANG=C /usr/bin/mrtg /etc/--debug="time,log" 2 Please note that I added debug option "time,log" to help troubleshoot. But when I tried with the rrdtool fetch, it still shows 5 minute data.. rrdtool fetch 192.168.1.40_24AVERAGE -a -s -1h -r 1m -a ds010500: 1.0150000000e 04 1.0158466667e 04 1479010800: 1.0150000000e 04 1.0158466667e 04 1479011100: 1.0145166667e 04 1.0153661556e 04 1479011400: 1.0021447006e 04 1.0029884972e 04 1479011700: 5.8127796610e 03 5.8212468060e 03 1479012000: 5.7859754098e 03 5.7944147796e 03 1479012300: 5.8089454941e 03 5.8174389793e 03 1479012600: 5.8006990960e 03 5.8091662411e 03 1479012900: 5.8047527778e 03 5.8132194444e 03 1479013200: 5.7812226321e 03 5.7896620018e 03 1479013500: 5.7946912568e 03 5.8031847421e 03 1479013800: 5.8049794444e 03 5.8134465895e 03 1479014100: -nan -nan in the RRD file.

In my /var/log/mrtg/mrtg.log, I see the data is logged every one minute as expected, however it does not try to calculate the throughput every minute. However, the likely cause is that you originally created the RRD file with a 5min interval, and then changed to a 1min interval later.

]]

To do this, create or update your periodic update script (e.g. /bin/sh PATH=/usr/local/bin:$ dir=/usr/local/bin APPLICATION_PATH=/srv/ixp # Synchronise configuration files $/bin/-a statistics-cli.gen-mrtg-conf # Kick daemons /etc/init.d/mrtg restart directory to the same location under your own skin.

" --time: prog start Sat Nov 12 2016 --time: loop start Sat Nov 12 2016 --time: snmp read start Sat Nov 12 2016 --time: target loop start Sat Nov 12 2016 --log: RRDs::tune(/var/mrtg/192.168.1.40_24-a ds5000000 -a ds5000000 -d ds0: COUNTER -d ds1: COUNTER) --log: RRDs::update(/var/mrtg/192.168.1.40_24.rrd, '14790128133702912456') --log: got: ??? --time: prog start Sat Nov 12 2016 --time: loop start Sat Nov 12 2016 --time: snmp read start Sat Nov 12 2016 --time: target loop start Sat Nov 12 2016 --log: RRDs::tune(/var/mrtg/192.168.1.40_24-a ds5000000 -a ds5000000 -d ds0: COUNTER -d ds1: COUNTER) --log: RRDs::update(/var/mrtg/192.168.1.40_24.rrd, '14790129168653262414') --log: got: 5804.75277777778/5813.21944444444 --time: prog start Sat Nov 12 2016 --time: loop start Sat Nov 12 2016 --time: snmp read start Sat Nov 12 2016 --time: target loop start Sat Nov 12 2016 --log: RRDs::tune(/var/mrtg/192.168.1.40_24-a ds5000000 -a ds5000000 -d ds0: COUNTER -d ds1: COUNTER) --log: RRDs::update(/var/mrtg/192.168.1.40_24.rrd, '14790129203453610922') --log: got: ??? --time: prog start Sat Nov 12 2016 --time: loop start Sat Nov 12 2016 --time: snmp read start Sat Nov 12 2016 --time: target loop start Sat Nov 12 2016 --log: RRDs::tune(/var/mrtg/192.168.1.40_24-a ds5000000 -a ds5000000 -d ds0: COUNTER -d ds1: COUNTER) --log: RRDs::update(/var/mrtg/192.168.1.40_24.rrd, '14790130237673953630') --log: got: ??? --time: prog start Sat Nov 12 2016 --time: loop start Sat Nov 12 2016 --time: snmp read start Sat Nov 12 2016 --time: target loop start Sat Nov 12 2016 --log: RRDs::tune(/var/mrtg/192.168.1.40_24-a ds5000000 -a ds5000000 -d ds0: COUNTER -d ds1: COUNTER) --log: RRDs::update(/var/mrtg/192.168.1.40_24.rrd, '14790130272474302138') --log: got: ??? --time: prog start Sat Nov 12 2016 --time: loop start Sat Nov 12 2016 --time: snmp read start Sat Nov 12 2016 --time: target loop start Sat Nov 12 2016 --log: RRDs::tune(/var/mrtg/192.168.1.40_24-a ds5000000 -a ds5000000 -d ds0: COUNTER -d ds1: COUNTER) --log: RRDs::update(/var/mrtg/192.168.1.40_24.rrd, '14790131307704654996') --log: got: ??? --time: prog start Sat Nov 12 2016 --time: loop start Sat Nov 12 2016 --time: snmp read start Sat Nov 12 2016 --time: target loop start Sat Nov 12 2016 --log: RRDs::tune(/var/mrtg/192.168.1.40_24-a ds5000000 -a ds5000000 -d ds0: COUNTER -d ds1: COUNTER) --log: RRDs::update(/var/mrtg/192.168.1.40_24.rrd, '14790132342655004954') --log: got: 5781.22263205829/5789.66200182149 --time: prog start Sat Nov 12 2016 --time: loop start Sat Nov 12 2016 --time: snmp read start Sat Nov 12 2016 --time: target loop start Sat Nov 12 2016 --log: RRDs::tune(/var/mrtg/192.168.1.40_24-a ds5000000 -a ds5000000 -d ds0: COUNTER -d ds1: COUNTER) --log: RRDs::update(/var/mrtg/192.168.1.40_24.rrd, '14790132376875347662') --log: got: ??? I am not particularly worried that it does not calculate the rate every minute however I need the data to be stored in the rrd database.

If you do this, then MRTG will not recreate the RRD file, though it will change to collecting data every 1min.

Errors like the following get logged now and then: SNMP Error: no response received SNMPv1_Session (remote host: "xxxx" [10.240.49.6].161) community: "public" request ID: 177908811 PDU bufsize: 8000 bytes timeout: 2s retries: 5 backoff: 1) at /usr/share/perl5/SNMP_line 492 SNMPGET Problem for 1.3.6.1.4.1.9.2.1.57.0 1.3.6.1.4.1.9.2.1.58.0 sys Uptime sys Name on [email protected]::::::v4only at /usr/bin/mrtg line 2207 2010-10-20 : WARNING: skipping because at least the query for 1.3.6.1.4.1.9.2.1.57.0 on did not su 2010-10-20 : WARNING: no data for 1.3.6.1.4.1.9.2.1.57&1.3.6.1.4.1.9.2.1.58:[email protected]

Skipping furthe 2010-10-19 : WARNING: could not match&get xxxx/if In Octets for Descr 'Dialer1' The more interesting part is that the log files get corrupted and not neccessarily these from the unreachable devices.

The Performance graphing tool (Multi Router Traffic Grapher) allows you to monitor Content Gateway performance and analyze network traffic.

You must have an account to comment. Please register or login here!