custom 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
emcmahon
Posts: 8
Joined: Tue Jan 28, 2020 11:05 am

custom reports

Post by emcmahon »

I am new to administering Nagios. I would like to be able to create a report to pull the results of a given service check.
for instance. i have a service checks that pulls all the serial numbers/ ID numbers / uptime /port statuses.. etc.. from our switches.

i would like to create a custom report that would display all serial numbers and hostnames only. a human readable output would be nice.

i would like there to be a way i can create a link under the "reports" side.php menu. i would like the user to be able to select a host or service and get the actual content not just "service ok" but the actual data in the field.

i have seen the JSON generator unfortunately i cannot get it to give me the content output. just the "Status of the service or host"

what would be the easiest way to accomplish something like this.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: custom reports

Post by cdienger »

Is something like the host group summary or grid what you're trying to go for? You could add the id checks to a service group and then request that sericegroup directly with the status.cgi:

Code: Select all

https://xi_ip/nagios/cgi-bin/status.cgi?servicegroup=servicegroupA&style=detail
And you can link directly to the information page of a service with a link like:

Code: Select all

https://xi_ip/nagios/cgi-bin/extinfo.cgi?type=2&host=hostA&service=serviceA
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
emcmahon
Posts: 8
Joined: Tue Jan 28, 2020 11:05 am

Re: custom reports

Post by emcmahon »

how are you assembling custom links. my nagios doesnt show any url when changing status pages. just the http://core_IP/nagios.

some of what i want can be done with creative service groups i guess. i was more looking for an 'on the fly' report.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: custom reports

Post by Box293 »

emcmahon wrote:how are you assembling custom links. my nagios doesnt show any url when changing status pages. just the http://core_IP/nagios.
Have a look at the status bar at the bottom of your browser when you hover over a link in Core, it shows the full url. Most directives are the same as they are defined in the config object definitions.

https://assets.nagios.com/downloads/nag ... tions.html

Also the JSON API is useful:

https://labs.nagios.com/2014/06/19/expl ... -7-part-1/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
emcmahon
Posts: 8
Joined: Tue Jan 28, 2020 11:05 am

Re: custom reports

Post by emcmahon »

thanks for the link info..feeling a little dumb for asking that one.



i would love to know how to put the output of the JSON tool into useful information. all i get if i used a json <> html tool is a dorky box look with info all about the fields and service and such but not the actual data in the field. image attached of a serial number check. it gives me a bunch of info but..not the serial number :)
Attachments
2020-01-31_9-32-44.jpg
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: custom reports

Post by Box293 »

Can you post some examples of the json tool and how you are using it.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked