Problems page and image links

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jag7720
Posts: 14
Joined: Wed Sep 15, 2010 11:24 am

Re: Problems page and image links

Post by jag7720 »

Just to follow up because I hate it when people leave a thread hanging with no concrete solution, here is my simple script that works for me.

Code: Select all

#!/bin/sh
##Set up the variables
filename="nagios-problems.txt"  #contains the subject text
report="status"`eval date +%Y%m%d`".html"  #contains the html of the status page

## Get the "Problems" page from Nagios
wget -k -O /path/to/$report --user nagios --password nagios "http://nagios.server.com/nagios/cgi-bin/status.cgi?host=all&servicestatustypes=28"

##Email it out.
/bin/mail -s "Current Problems on `eval date +%Y%m%d`" -a /path/to/$report [email protected],[email protected],[email protected]  < /path/to/$filename
then set up a cronjob to run it when you need the report
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Problems page and image links

Post by mguthrie »

Thanks for posting this! I'm sure you won't be the last person who needs to do this.
Locked