Page 1 of 1

CRONTAb for csv reports

Posted: Sun Sep 03, 2017 1:07 am
by Manjula
HI
Can you plesae how to run cron job at particualr time for csv reports gebereation
ex: i want take daliy uas report for particular host daily like from 02-09-2017 00:00 hrs to 03-09-2017 23:59 hrs

Re: CRONTAb for csv reports

Posted: Tue Sep 05, 2017 8:10 am
by scottwilkerson
In Nagios Core there is no pre-defined way to do this, but it is available in Nagios XI

You would need to run the report and calculate the URL that you want to run, and then in your crontab you could add the report like this to run at 6am

Code: Select all

0 6 * * *      curl http://USERNAME:PASSWORD@localhost/nagios/path/to_your_report > /tmp/your_report 2> /dev/null