Page 1 of 1

Auto-Generation of Availability Reports

Posted: Fri Aug 13, 2021 6:27 am
by KopRFace
Hello everyone! :)

I'm sorry in advance if this question has already been answered, but I searched everywhere on this forum and over other forums and articles, but I just couldn't find the solution I'm looking for.

I'm running Nagios Core 4.4.5 on a CentOS RHEL 7 (minimal version) Virtual Machine powered by VMWare 16

I've already configured Nagios and added some hosts and hostgroups to monitor as well as a very basic ping service. I'm also able to generate availability reports through the web interface with my browser, but the thing is, I have to do it manually.

Is there a way to generate every week an availability report and output it to csv format? What are the options after that? Can it be sent via mail and/or stored locally outside of the VM's disk, more precisely on my local disk?

Thanks in advance for your answers!

Re: Auto-Generation of Availability Reports

Posted: Fri Aug 13, 2021 11:28 am
by mcapra
Nagios XI has a concept of scheduled reports, but I don't know of anything like this that would exist in the Nagios Core ecosystem.

I'm sure with some clever scripting you could hit avail.cgi with some parameters on a cron job and pipe the output into an email.

Re: Auto-Generation of Availability Reports

Posted: Tue Aug 17, 2021 3:29 am
by KopRFace
mcapra wrote:Nagios XI has a concept of scheduled reports, but I don't know of anything like this that would exist in the Nagios Core ecosystem.

I'm sure with some clever scripting you could hit avail.cgi with some parameters on a cron job and pipe the output into an email.
Hello thanks for your answer :) ! I've been without an access to internet this weekend so I just saw your answer.

Can you explain what is a cron job please?

Re: Auto-Generation of Availability Reports

Posted: Wed Aug 18, 2021 9:28 am
by KopRFace
mcapra wrote:Nagios XI has a concept of scheduled reports, but I don't know of anything like this that would exist in the Nagios Core ecosystem.

I'm sure with some clever scripting you could hit avail.cgi with some parameters on a cron job and pipe the output into an email.
After a bit of research and learning what is a cron job and how it works, I've been able to create a script that emulates the availability report creation button. Another script has been created alongside to create a .csv file where the contents of the availability report were inserted, and send it by mail. Finally I set up a cron job ;) to run the scripts every Monday.

Thanks a LOT for your answer! Everything works fine ;)