Create Nagios XI URL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nietonoshana
Posts: 26
Joined: Thu Jul 04, 2013 1:05 pm

Create Nagios XI URL

Post by nietonoshana »

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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Create Nagios XI URL

Post by mcapra »

Try this:

Code: Select all

http://nagios_host/nagiosxi/includes/components/xicore/status.php?&show=hosts&hoststatustypes=12&hostattr=8
These are the GET vars you can leverage:

Code: Select all

    $dargs = array(
        DASHLET_ARGS => array(
            "host" => $host,
            "hostgroup" => $hostgroup,
            "servicegroup" => $servicegroup,
            "hostattr" => $hostattr,
            "serviceattr" => $serviceattr,
            "hoststatustypes" => $hoststatustypes,
            "servicestatustypes" => $servicestatustypes,
            "show" => $show
        )
    );
And the constants used are located in /usr/local/nagiosxi/html/includes/constants.inc.php. Relevant ones i'm leveraging here:

Code: Select all

define("HOSTSTATUSATTR_NOTACKNOWLEDGED", 8);
..
define("HOSTSTATE_DOWN", 4);
define("HOSTSTATE_UNREACHABLE", 8);
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.
Former Nagios employee
https://www.mcapra.com/
nietonoshana
Posts: 26
Joined: Thu Jul 04, 2013 1:05 pm

Re: Create Nagios XI URL

Post by nietonoshana »

Thanks it's what I was looking for
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Create Nagios XI URL

Post by rkennedy »

Great - would you mind if we closed this thread up and marked it resolved?
Former Nagios Employee
nietonoshana
Posts: 26
Joined: Thu Jul 04, 2013 1:05 pm

Re: Create Nagios XI URL

Post by nietonoshana »

Yes, thanks
Locked