Backend API Question
Posted: Tue Mar 19, 2013 12:16 pm
HI Guys,
I am trying to build a component for our XI environment. We use custom/ free variables with Nagios to identify what type of device it is. Is it possible to grab these fields via the backend API. As far as I can see from the xml dump I cant see those free variables. Not very keen on doing direct look ups on the DB .
host id="763">
<instance_id>1</instance_id>
<host_name>www.khipu-networks.com</host_name>
<is_active>1</is_active>
<config_type>1</config_type>
<alias>www.khipu-networks.com</alias>
<display_name>www.khipu-networks.com</display_name>
<address>www.khipu-networks.com</address>
<check_interval>5</check_interval>
<retry_interval>1</retry_interval>
<max_check_attempts>5</max_check_attempts>
<first_notification_delay>0</first_notification_delay>
<notification_interval>60</notification_interval>
<passive_checks_enabled>1</passive_checks_enabled>
<active_checks_enabled>1</active_checks_enabled>
<notifications_enabled>1</notifications_enabled>
<notes/>
<notes_url/>
<action_url/>
<icon_image>www_server.png</icon_image>
<icon_image_alt/>
<statusmap_image>www_server.png</statusmap_image>
</host>
I am trying to build a component for our XI environment. We use custom/ free variables with Nagios to identify what type of device it is. Is it possible to grab these fields via the backend API. As far as I can see from the xml dump I cant see those free variables. Not very keen on doing direct look ups on the DB .
host id="763">
<instance_id>1</instance_id>
<host_name>www.khipu-networks.com</host_name>
<is_active>1</is_active>
<config_type>1</config_type>
<alias>www.khipu-networks.com</alias>
<display_name>www.khipu-networks.com</display_name>
<address>www.khipu-networks.com</address>
<check_interval>5</check_interval>
<retry_interval>1</retry_interval>
<max_check_attempts>5</max_check_attempts>
<first_notification_delay>0</first_notification_delay>
<notification_interval>60</notification_interval>
<passive_checks_enabled>1</passive_checks_enabled>
<active_checks_enabled>1</active_checks_enabled>
<notifications_enabled>1</notifications_enabled>
<notes/>
<notes_url/>
<action_url/>
<icon_image>www_server.png</icon_image>
<icon_image_alt/>
<statusmap_image>www_server.png</statusmap_image>
</host>