Hello I need create a URL in Nagios XI
with Host Down &hoststatustypes=4
and
Host state unacknowledged &hostprops=8
But I see UNACKNOWLEDGED and ACKNOWLEDGED
Can you helpme whit this.
I have Nagios XI 5.4.2 in Centos 7
The URL is:
http:/servernagios/nagiosxi/includes/components/xicore/status.php?&show=hosts&hoststatustypes=4&hostprops=8
Create Nagios XI URL
Re: Create Nagios XI URL
Try this:
These are the GET vars you can leverage:
And the constants used are located in /usr/local/nagiosxi/html/includes/constants.inc.php. Relevant ones i'm leveraging here:
Basically, like Unix permissions, you add up the numbers from each constant to get the desired filtering. For my hoststatustypes I want to see "DOWN" and "UNREACHABLE", so I add 8+4=12. Since I also only want to see un-acknowledged problems, I add the hostattr=8 to my request.
Code: Select all
http://nagios_host/nagiosxi/includes/components/xicore/status.php?&show=hosts&hoststatustypes=12&hostattr=8Code: Select all
$dargs = array(
DASHLET_ARGS => array(
"host" => $host,
"hostgroup" => $hostgroup,
"servicegroup" => $servicegroup,
"hostattr" => $hostattr,
"serviceattr" => $serviceattr,
"hoststatustypes" => $hoststatustypes,
"servicestatustypes" => $servicestatustypes,
"show" => $show
)
);
Code: Select all
define("HOSTSTATUSATTR_NOTACKNOWLEDGED", 8);
..
define("HOSTSTATE_DOWN", 4);
define("HOSTSTATE_UNREACHABLE", 8);Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
nietonoshana
- Posts: 26
- Joined: Thu Jul 04, 2013 1:05 pm
Re: Create Nagios XI URL
Thanks it's what I was looking for
Re: Create Nagios XI URL
Great - would you mind if we closed this thread up and marked it resolved?
Former Nagios Employee