Page 1 of 1

Add more column in Service Status Details For All Hosts

Posted: Sun Nov 01, 2015 9:55 am
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

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

Posted: Sun Nov 01, 2015 10:35 pm
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

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

Posted: Tue Nov 03, 2015 9:24 am
by lppnghia
Thank you, I am researching on it.

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

Posted: Tue Nov 03, 2015 4:51 pm
by rkennedy
Sounds good. I will leave this thread open for now, but let us know if this works for you or not.

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

Posted: Wed Apr 13, 2016 7:17 am
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

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

Posted: Wed Apr 13, 2016 10:45 am
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.

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

Posted: Thu Apr 14, 2016 3:16 am
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..

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

Posted: Thu Apr 14, 2016 10:02 am
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

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

Posted: Fri Apr 15, 2016 3:23 am
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.

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

Posted: Fri Apr 15, 2016 12:09 pm
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.