Add more column in Service Status Details For All Hosts

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
lppnghia
Posts: 2
Joined: Sun Oct 25, 2015 12:17 am

Add more column in Service Status Details For All Hosts

Post by lppnghia »

HI all.
Currently, in "Service Status Details For All Hosts", there are 7 columns (Host, Service, Status, Last Check, Duration, Attempt, Status INformation). Now I wanna add one column (such as Alias , name which I define in define host). I am using Nagios core 4.1.1. Where can i modify to add column ?
Another question, regarding "tooltip" when I drag mouse to host. Default it show IP address, now i want to show such as Alias as well. How can i edit it in code or somewhere in configuration file of Nagios?
Thanks
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Add more column in Service Status Details For All Hosts

Post by Box293 »

Adding another column or changing tooltips is going to require you to edit the source code as these screens are created using the status cgi (status.cfg).

To specifically answer your question, you are most likely going to need to edit status.c and then re-compile.

https://github.com/NagiosEnterprises/na ... i/status.c

Have a look around line 1344.

However have a look at the available web interfaces that bolt onto Nagios Core, you might find what you're looking for and more.

https://exchange.nagios.org/directory/A ... Interfaces
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
lppnghia
Posts: 2
Joined: Sun Oct 25, 2015 12:17 am

Re: Add more column in Service Status Details For All Hosts

Post by lppnghia »

Thank you, I am researching on it.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Add more column in Service Status Details For All Hosts

Post by rkennedy »

Sounds good. I will leave this thread open for now, but let us know if this works for you or not.
Former Nagios Employee
Bone8Head
Posts: 106
Joined: Tue Nov 10, 2015 2:39 am

Re: Add more column in Service Status Details For All Hosts

Post by Bone8Head »

Hello Guys,

sorry for rianimate this Thread but I'm trying to add one Column too, but I can't find the "status.cfg" file.

Can you tell me where is it and how can I edit it? (Notepad++ is ok?)

Thank you
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Add more column in Service Status Details For All Hosts

Post by rkennedy »

Box293 wrote:Adding another column or changing tooltips is going to require you to edit the source code as these screens are created using the status cgi (status.cfg).

To specifically answer your question, you are most likely going to need to edit status.c and then re-compile.

https://github.com/NagiosEnterprises/na ... i/status.c

Have a look around line 1344.

However have a look at the available web interfaces that bolt onto Nagios Core, you might find what you're looking for and more.

https://exchange.nagios.org/directory/A ... Interfaces
This actually isn't as easy as just modifying a status.cfg file, it's status.c. You'll need someone with C programming experience, and have to modify the source of Core. Once it's done, you'll want to recompile and go from there.
Former Nagios Employee
Bone8Head
Posts: 106
Joined: Tue Nov 10, 2015 2:39 am

Re: Add more column in Service Status Details For All Hosts

Post by Bone8Head »

rkennedy wrote:
Box293 wrote:Adding another column or changing tooltips is going to require you to edit the source code as these screens are created using the status cgi (status.cfg).

To specifically answer your question, you are most likely going to need to edit status.c and then re-compile.

https://github.com/NagiosEnterprises/na ... i/status.c

Have a look around line 1344.

However have a look at the available web interfaces that bolt onto Nagios Core, you might find what you're looking for and more.

https://exchange.nagios.org/directory/A ... Interfaces
This actually isn't as easy as just modifying a status.cfg file, it's status.c. You'll need someone with C programming experience, and have to modify the source of Core. Once it's done, you'll want to recompile and go from there.
Ok, thank you.
So, there is not an "Easy Way" for do that? It seems that the "Alias" of the Hosts is not that Useful in Nagios Core, if in the Hosts and Services Details I can't see it..
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Add more column in Service Status Details For All Hosts

Post by rkennedy »

The method to accomplish this is described above, I'd contact a C developer in your environment to review it.

The alias is shown on the pages that pertain specifically to the host / service. I don't think this would benefit anyone, as some will use unique long strings as the alias. This would end up making the table huge.

If you think it should be otherwise, feel free to raise an issue on the GitHub. https://github.com/NagiosEnterprises/nagioscore/issues
Former Nagios Employee
Bone8Head
Posts: 106
Joined: Tue Nov 10, 2015 2:39 am

Re: Add more column in Service Status Details For All Hosts

Post by Bone8Head »

rkennedy wrote:The method to accomplish this is described above, I'd contact a C developer in your environment to review it.

The alias is shown on the pages that pertain specifically to the host / service. I don't think this would benefit anyone, as some will use unique long strings as the alias. This would end up making the table huge.

If you think it should be otherwise, feel free to raise an issue on the GitHub. https://github.com/NagiosEnterprises/nagioscore/issues
Ok, thank you.
You can close the Thread.
bwallace
Posts: 1146
Joined: Tue Nov 17, 2015 1:57 pm

Re: Add more column in Service Status Details For All Hosts

Post by bwallace »

Glad we were able to help. We'll lock this thread now and feel free to open another should you require assistance with anything else.
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked