Page 5 of 6

Re: missing bandwidth perf data for network devices

Posted: Fri Mar 04, 2016 10:21 am
by bosecorp
I am not able to access the link

Re: missing bandwidth perf data for network devices

Posted: Fri Mar 04, 2016 1:56 pm
by ssax
Did you create an account on there?

Attaching here in case you still have problems:
mrtg.zip
Summary:

Using a bash script to run MRTG - track how long MRTG runs for and then submit a passive check result to Nagios

Description:

I've always wanted some more diagnostics for MRTG. Specifically it would be great to know how long MRTG runs for, every time it runs.

I've created a bash script that will run the MRTG job and when the MRTG job finishes it submits a passive check result to Nagios for a localhost service.

The passive service doesn't do any alerting, it's simply for knowing a) how long it takes to run each time b) collecting this data in RRDs for viewing the standard runtimes.
Steps To Reproduce I've attached a script called mrtg.sh which needs to be placed into:
/usr/local/nagiosxi/scripts/

Update ownership and permissions:
chown root:nagios /usr/local/nagiosxi/scripts/mrtg.sh
chmod +rx /usr/local/nagiosxi/scripts/mrtg.sh

Update cron job:
cat /etc/cron.d/mrtg
*/5 * * * * root /usr/local/nagiosxi/scripts/mrtg.sh

Create passive service for localhost:

define service {
host_name localhost
service_description MRTG Runtime Statistics
use xiwizard_passive_service
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 1
notification_period xi_timeperiod_24x7
contacts nagiosadmin
register 1
}

Sit back and relax while the bash script does all the work.

Re: missing bandwidth perf data for network devices

Posted: Sun Apr 03, 2016 8:55 pm
by bosecorp
Upgraded nagios to the latest version

Gonna wait to see if that helps

Re: missing bandwidth perf data for network devices

Posted: Mon Apr 04, 2016 12:26 pm
by ssax
Ok, thanks, let us know the results.

Re: missing bandwidth perf data for network devices

Posted: Tue Apr 05, 2016 9:52 am
by bosecorp
upgrading to the latest version didn't help

Re: missing bandwidth perf data for network devices

Posted: Tue Apr 05, 2016 1:01 pm
by ssax
Did you implement box293's recommendation so that we can see if MRTG is running longer than 5 minutes? If so, what were the results?

Re: missing bandwidth perf data for network devices

Posted: Thu May 19, 2016 8:40 am
by bosecorp
I have not, but I have seen better performance lately. meaning, I don't see gaps anymore. which concerns me because I haven't make any significant change

Re: missing bandwidth perf data for network devices

Posted: Thu May 19, 2016 1:15 pm
by ssax
I still recommend that you set it up so that you can see how long it takes to run, it may be running better right now but it may be close to the 5 minutes mark and would only occur after the 5 minutes mark (load, network, polling speed, etc).

Re: missing bandwidth perf data for network devices

Posted: Wed May 25, 2016 8:54 pm
by bosecorp
I am seing the issue again

I am going to follow your recommendation to see how long it takes

Re: missing bandwidth perf data for network devices

Posted: Thu May 26, 2016 3:24 pm
by tgriep
Let us know how it works out.