Nagios reports CLI
Posted: Fri Feb 15, 2019 8:46 am
Hello,
Every year we have to generate reports for the management team. There are 5 hostgroups whe should generate a report from for each quarter, so 20 reports. Now we do this manuel through the webinterface, but every report takes about 1,5 hour to generate. So we would like to automate this proces.
I tried to figure this out trough the CLI. But when I tried ussing wget I always got 'Your session has timed out.' in the file. This is the command I tried:
We would like to trigger this command remotely and change variables (hostgroup, timeperiod, ...), but first I need to know how to generate reports trough the CLI.
Can you guys help me out?
Thanks in advance!
Greetings,
Jonas De la Marche
Every year we have to generate reports for the management team. There are 5 hostgroups whe should generate a report from for each quarter, so 20 reports. Now we do this manuel through the webinterface, but every report takes about 1,5 hour to generate. So we would like to automate this proces.
I tried to figure this out trough the CLI. But when I tried ussing wget I always got 'Your session has timed out.' in the file. This is the command I tried:
Code: Select all
wget --user 'user' --password 'password' -O /tmp/report.csv 'https://nagiosserver/nagiosxi/reports/availability.php?reportperiod=custom&startdate=2018-01-01%2000%3A00%3A00&enddate=2018-12-31%2023%3A59%3A59&host=&service=&hostgroup=hg_ind_exchange&servicegroup=&advanced=1&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringdowntime=yes&includesoftstates=no&assumedhoststate=3&assumedservicestate=6&timeperiod=xi_timeperiod_24x7&dont_count_downtime=on&dont_count_warning=on&mode=getreport&mode=csv&csvtype=combined'Can you guys help me out?
Thanks in advance!
Greetings,
Jonas De la Marche