Availaibility Report to PDF in Core 4.0.8
Posted: Fri Apr 10, 2015 8:36 am
Hi Everyone,
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...
Now, if i browse to the address in a web browser, the page loads as expected and I can see the report. BUT if I run the command from the command line I get the below...
It generates the PDF document and all it contains is the below...
Does anyone have any suggestions?? Note, it works for other sites, just not nagios.
Thanks!
Ash
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.pdfCode: 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