get_xml_host_status backend commands

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lizhi1989
Posts: 9
Joined: Mon Aug 14, 2017 3:18 am

get_xml_host_status backend commands

Post by lizhi1989 »

where can i find a complete list of these backend commands? Does it support gethostgroups command?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: get_xml_host_status backend commands

Post by scottwilkerson »

Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
lizhi1989
Posts: 9
Joined: Mon Aug 14, 2017 3:18 am

Re: get_xml_host_status backend commands

Post by lizhi1989 »

im possible to get the list of host members using the link below:
backend/?cmd=gethostgroupmembers&orderby=host_name:a

but is not able to sort it in and host_name ascending order.

how to achieve that?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: get_xml_host_status backend commands

Post by dwhitfield »

The orderby is PHP, not a URL. You will need to use the document provided to build a component.

You could also potentially build a dashlet, but I don't believe we have a document for that. We do have https://assets.nagios.com/downloads/nag ... ios-XI.pdf going over the basics though, which may help.
lizhi1989
Posts: 9
Joined: Mon Aug 14, 2017 3:18 am

Re: get_xml_host_status backend commands

Post by lizhi1989 »

basically what im doing is calling get_xml_hostgroup_member_objects() to get a list of hostgroup and members in xml, passing brevity=3 as my argument and is thinking of passing orderby argument too but is not able to achieve the ascending result that i want.

Not very sure how to do it in a php way too as the return is a xml data.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: get_xml_host_status backend commands

Post by dwhitfield »

Can you post the PHP you have so that we can take a look? Also, you may want to take a look at XSLT: https://www.w3schools.com/xml/xsl_intro.asp
Locked