Backend API question

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Backend API question

Post by BanditBBS »

I'm trying to use the backend to get a list of Hosts. The gethosts or gethostgroupmembers command would work for me, but is there any way to limit it to only show a specific hostgroup instead of all? I tried adding &hostgroup=all_linux to the url but it made no difference...someone tell me I can do it an how :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Backend API question

Post by BanditBBS »

Nevermind, figured it out looking at the xml, hostgroup_name is the field I have to add.

edited for my terrible spelling
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Backend API question

Post by abrist »

np. I find checking the key names in the xml to be a good way to know what to query. Happy trails good sir.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked