HOSTGROUPMEMBERS

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
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

HOSTGROUPMEMBERS

Post by amprantino »

Hello all,

I am trying to automate things using HOSTGROUPMEMBERS Macro.

Is it possible to get the $HOSTSTATEID$ of all $HOSTGROUPMEMBERS$ ??

I want to get the HoststateID of all member of a hostgroup.
So can I use: $HOSTSTATEID$:AP_GRP_1:$HOSTGROUPMEMBERS$ ??? Or something difefrent ?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: HOSTGROUPMEMBERS

Post by jdalrymple »

Those macros are only available in the context of an activity such as a notification or check or event handler.

What you're trying to do is outside the scope of a normal Nagios process right? If that's the case probably the easiest route would be to create a query to grab that info from the database.
Locked