How can I configure alerts when the text obtained by the api changes, currently it already shows the UP and Down values ??in the status, but it has not been possible for me to indicate that down is an error state


Article Comments

Hello Dear customer,

I hope you are doing great

Can you please share more information about the API you are using? and what are you trying to reach on this case?

As many details you can share will be useful.


Jul, 2022 - Permalink

I am using the Palo Alto API to notify when a routing policy changes state.

https://Firewall/api/?type=op&cmd=<show><pbf><rule><name>FirtsRouteLVP</name></rule></pbf></show>&key=xxxxxxx

This return a XML response like this

<response status="success">
<result>
<dp>dp0</dp>
<entries>
<entry>
<extended-match>No</extended-match>
<sym-return>No</sym-return>
<interval>2</interval>
<name>FirtsRouteLVP</name>
<mon_action>Monitor</mon_action>
<nh_state>UP</nh_state>
<nexthop>x.x.x.x </nexthop>
<mon_ip>x.x.x.x</mon_ip>
<mon_slot>1</mon_slot>
<state>Active</state>
<egress>ethernet1/7</egress>
<match>1455551323</match>
<threshold>3</threshold>
<action>Forward</action>
<got>6054373</got>
<type>0</type>
<id>2</id>
<sent>6210176</sent>
<nexthop_type>IP</nexthop_type>
</entry>
</entries>
</result>

and in this response i check the next Hope state:

<nh_state>UP</nh_state>

if this is Down we need to receive a notify or alert message


Jul, 2022 - Permalink

Hello,

Thank you for your response and clarification.

My recommendation now is to use REST Custom v2 sensor and displays the answer in the sensor's message.

Please check the following article about REST Custom configuration: https://www.paessler.com/prtg/history/stable


Jul, 2022 - Permalink