Auto-Generation of Availability Reports

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
KopRFace
Posts: 3
Joined: Fri Aug 13, 2021 6:11 am

Auto-Generation of Availability Reports

Post 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!
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Auto-Generation of Availability Reports

Post 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.
Former Nagios employee
https://www.mcapra.com/
KopRFace
Posts: 3
Joined: Fri Aug 13, 2021 6:11 am

Re: Auto-Generation of Availability Reports

Post 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?
KopRFace
Posts: 3
Joined: Fri Aug 13, 2021 6:11 am

Re: Auto-Generation of Availability Reports

Post 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 ;)
Locked