Page 1 of 2
Nagios XI Thresholds for Specific Groups
Posted: Fri Mar 08, 2019 10:54 am
by emartine
Is there a way to pull down all of the threshold configuration information for a group of servers?
Re: Nagios XI Thresholds for Specific Groups
Posted: Fri Mar 08, 2019 3:04 pm
by npolovenko
@emartine, Are you looking to get $ARGx$ values for all hosts in a hostgroup? I think the only way is to use a custom script that would pull all the check_command values from the /usr/local/nagios/var/objects.cache file. Then you'd need to create an algorithm that would only show commands from hosts that belong to certain hostgroups.
Re: Nagios XI Thresholds for Specific Groups
Posted: Mon Mar 11, 2019 10:27 am
by emartine
Figured I would have to do something custom.
Re: Nagios XI Thresholds for Specific Groups
Posted: Mon Mar 11, 2019 11:46 am
by npolovenko
@emartine, Let me know if you have any other questions?
Re: Nagios XI Thresholds for Specific Groups
Posted: Tue Mar 12, 2019 5:28 pm
by SteveBeauchemin
Would a SQL query help? You can wrap the output in a web page like I do.
If this type of data would be useful let me know and I'll PM you a perl app that grabs data and makes html file.
I don't have host groups in the query but you could probably add it.
Let me know...
Steve B
Cmd-Args.PNG
These are the complete list of columns
Code: Select all
print OUTFILE " <TH>Host</TH>\n";
print OUTFILE " <TH>Service</TH>\n";
print OUTFILE " <TH>Contact Group</TH>\n";
print OUTFILE " <TH>Alias</TH>\n";
print OUTFILE " <TH>Check Interval</TH>\n";
print OUTFILE " <TH>Retry Interval</TH>\n";
print OUTFILE " <TH>Max Check Attempts</TH>\n";
print OUTFILE " <TH>Re-Notify Interval</TH>\n";
print OUTFILE " <TH>Command Arguments</TH>\n";
Re: Nagios XI Thresholds for Specific Groups
Posted: Wed Mar 13, 2019 2:42 pm
by npolovenko
Now that
@SteveBeauchemin mentioned this query I remembered another way to look at the commands and thresholds in the Core interface. To open the core interface in your web browser type in the XI IP address /nagios
Untitled.png
Then click on the configuration menu in the left column, select hosts or services and hit continue.
Re: Nagios XI Thresholds for Specific Groups
Posted: Fri Mar 15, 2019 11:45 am
by emartine
npolovenko wrote:Now that
@SteveBeauchemin mentioned this query I remembered another way to look at the commands and thresholds in the Core interface. To open the core interface in your web browser type in the XI IP address /nagios
Untitled.png
Then click on the configuration menu in the left column, select hosts or services and hit continue.
I've been doing that but when you have to grab a list of 20 servers w/ services... checking for each server is somewhat of a time consuming.
Re: Nagios XI Thresholds for Specific Groups
Posted: Fri Mar 15, 2019 11:46 am
by emartine
SteveBeauchemin wrote:Would a SQL query help? You can wrap the output in a web page like I do.
If this type of data would be useful let me know and I'll PM you a perl app that grabs data and makes html file.
I don't have host groups in the query but you could probably add it.
Let me know...
Steve B
Cmd-Args.PNG
These are the complete list of columns
Code: Select all
print OUTFILE " <TH>Host</TH>\n";
print OUTFILE " <TH>Service</TH>\n";
print OUTFILE " <TH>Contact Group</TH>\n";
print OUTFILE " <TH>Alias</TH>\n";
print OUTFILE " <TH>Check Interval</TH>\n";
print OUTFILE " <TH>Retry Interval</TH>\n";
print OUTFILE " <TH>Max Check Attempts</TH>\n";
print OUTFILE " <TH>Re-Notify Interval</TH>\n";
print OUTFILE " <TH>Command Arguments</TH>\n";
Thanks Steve. This is much appreciated!
Re: Nagios XI Thresholds for Specific Groups
Posted: Fri Mar 15, 2019 12:06 pm
by npolovenko
@emartine, What if you kept the command and arguments blank for your services but had them defined in the service template? That way you'll know for sure all arguments for services are the same.
Hope
@SteveBeauchemin's query worked for you. Let us know if we can lock this thread?
Re: Nagios XI Thresholds for Specific Groups
Posted: Fri Mar 15, 2019 1:55 pm
by SteveBeauchemin
I will send you the file in a PM - personal message...
You can dissect the code and get the SQL - or just make the code work for you.
Steve B