Page 1 of 1

custom reports

Posted: Wed Jan 29, 2020 11:56 am
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.

Re: custom reports

Posted: Wed Jan 29, 2020 5:24 pm
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

Re: custom reports

Posted: Thu Jan 30, 2020 3:21 pm
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.

Re: custom reports

Posted: Thu Jan 30, 2020 7:48 pm
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/

Re: custom reports

Posted: Fri Jan 31, 2020 9:35 am
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 :)

Re: custom reports

Posted: Tue Feb 04, 2020 5:37 pm
by Box293
Can you post some examples of the json tool and how you are using it.