Hi All,
I have a requirement, wherein I need to display overall status of a hots group and customise it to our own requirements .
Be it the widget size, font or background color of the host which in down/up/unknown state.
Nagios XI does has the inbuilt host group status/summary pages but I am looking far more customisation.
Basically I know Shell & HTML well. It would be helpful if I get a start to this.
I have gone through the below link for Nagios XI commands. But are there any more ? Which can be used to just display the statistics rather perform operations ?
https://assets.nagios.com/downloads/nag ... btnSubmit=
Also went through web interfaces which requires some tools to be installed
https://exchange.nagios.org/directory/A ... terfaces
Nagios version used is 5.5.2
Nagios XI web interface using Shell/HTML script
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Nagios XI web interface using Shell/HTML script
Hello,
You can use the custom includes component to upload you own css classes, images and JavaScript files and customize the XI interface. Additionally, this will not be overwritten by future updates of XI.
We have a knowledgebase article on the Custom Includes Component here:
https://support.nagios.com/kb/article.php?id=556
Also, more dashlets are available on the Nagios Exchange:
https://exchange.nagios.org/directory/Addons/Dashlets
You can use the custom includes component to upload you own css classes, images and JavaScript files and customize the XI interface. Additionally, this will not be overwritten by future updates of XI.
We have a knowledgebase article on the Custom Includes Component here:
https://support.nagios.com/kb/article.php?id=556
Also, more dashlets are available on the Nagios Exchange:
https://exchange.nagios.org/directory/Addons/Dashlets
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios XI web interface using Shell/HTML script
Thanks @benjaminsmith .
But I was actually looking for some thing like below code. Below code will acknowledge the host problem.
Similar way, Can I get the command which could list all the members in a particular host group ?
Say, Windows_servers is a host group with some 10 servers.
So, If I could get the command to list these 10 servers , I will use it in shell script and display the result in table format using HTML and show the result in a HTML page.
But I was actually looking for some thing like below code. Below code will acknowledge the host problem.
Similar way, Can I get the command which could list all the members in a particular host group ?
Say, Windows_servers is a host group with some 10 servers.
So, If I could get the command to list these 10 servers , I will use it in shell script and display the result in table format using HTML and show the result in a HTML page.
Code: Select all
#!/bin/sh
# This is a sample shell script showing how you can submit the ACKNOWLEDGE_HOST_PROBLEM command
# to Nagios. Adjust variables to fit your environment as necessary.
now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'
/bin/printf "[%lu] ACKNOWLEDGE_HOST_PROBLEM;host1;2;1;1;Some One;Some Acknowledgement Comment\n" $now > $commandfile
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios XI web interface using Shell/HTML script
You cannot use the nagios.cmd to get information, only to submit commnads.
In Nagios XI you can get all of the information you are looking for through:
Help -> REST API Docs -> Objects Reference
In Nagios XI you can get all of the information you are looking for through:
Help -> REST API Docs -> Objects Reference
Re: Nagios XI web interface using Shell/HTML script
Thanks @ scottwilkerson
====
We have a large monitor setup to display the alerts.
I was just looking for creating some customised dashboards/tables for different application teams by pulling data from Nagios.
====
cool. Need to check some other alternatives then.You cannot use the nagios.cmd to get information, only to submit commnads.
We have a large monitor setup to display the alerts.
I was just looking for creating some customised dashboards/tables for different application teams by pulling data from Nagios.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios XI web interface using Shell/HTML script
Sounds good.sajid4u2c wrote:Thanks @ scottwilkerson
====cool. Need to check some other alternatives then.You cannot use the nagios.cmd to get information, only to submit commnads.
We have a large monitor setup to display the alerts.
I was just looking for creating some customised dashboards/tables for different application teams by pulling data from Nagios.