This is my first post here please be gentle! I've used nagios as a user for a while but this is the first system I've had to configure and I'm not a linux expert!!!
I've got Core 4.0.8 running happily on Ubuntu Server 14.04 however I've been asked to get PDF reports of the Host Availability to be emailed out on a monthly basis, My initial thoughts were to use something like WKHTMLTOPDF, sending via Postfix on a monthly Cronjob.
HOWEVER, I run the below command as nagiosadmin to create the PDFs...
Code: Select all
su - nagiosadmin /usr/local/bin/wkhtmltopdf.sh "http://x.x.x.x/nagios/cgi-bin/avail.cgi?show_log_entries=&hostgroup=windows-servers&timeperiod=last31days&smon=4&sday=1&syear=2015&shour=0&smin=0&ssec=0&emon=4&eday=9&eyear=2015&ehour=24&emin=0&esec=0&rpttimeperiod=&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringnotrunning=yes&includesoftstates=no&initialassumedhoststate=3&initialassumedservicestate=0&backtrack=4" /home/nagiosadmin/all_hosts_last31days.pdf
Code: Select all
nagiosadmin@nagios:/home$ su - nagiosadmin /usr/local/bin/wkhtmltopdf.sh "http://127.0.0.1/nagios/cgi-bin/avail.cgi?show_log_entries=&hostgroup=windows-servers&timeperiod=last31days&smon=4&sday=1&syear=2015&shour=0&smin=0&ssec=0&emon=4&eday=9&eyear=2015&ehour=24&emin=0&esec=0&rpttimeperiod=&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringnotrunning=yes&includesoftstates=no&initialassumedhoststate=3&initialassumedservicestate=0&backtrack=4" /home/nagiosadmin/all_hosts_last31days.pdf
Password:
Loading page (1/2)
Printing pages (2/2)
Done
Forbidden
You don't have permission to access /nagios/cgi-bin/avail.cgi on this server.
Does anyone have any suggestions?? Note, it works for other sites, just not nagios.
Thanks!
Ash