Page 1 of 1
get_xml_host_status backend commands
Posted: Tue Aug 15, 2017 11:19 pm
by lizhi1989
where can i find a complete list of these backend commands? Does it support gethostgroups command?
Re: get_xml_host_status backend commands
Posted: Wed Aug 16, 2017 10:35 am
by scottwilkerson
Re: get_xml_host_status backend commands
Posted: Thu Aug 17, 2017 2:42 am
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?
Re: get_xml_host_status backend commands
Posted: Thu Aug 17, 2017 1:11 pm
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.
Re: get_xml_host_status backend commands
Posted: Thu Aug 17, 2017 9:36 pm
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.
Re: get_xml_host_status backend commands
Posted: Fri Aug 18, 2017 4:06 pm
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