I
I
Ivan Trofimov2014-07-09 12:40:37
System administration
Ivan Trofimov, 2014-07-09 12:40:37

How to connect to cisco via telnet in ZABBIX, from there ping the machine via IP and get the result not as a string, but TRUE or FALSE?

Created a monitoring element that uses the "TELNET agent" type. Connects fine.
Script to execute: ping IP address
Information type: character.
As a result, I get the result from cisco:

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to <i>IP-адрес</i>, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

And all this is recorded in history. I want the value TRUE or FALSE to be written to the history, depending on the result returned by the tsiska (in our case, !!!!! => TRUE).
How to transform the received result to the necessary form?
PS: by the way, I created a regular expression myreg that returns TRUE if we have "!!!!!", but I don't understand how and where to use it.
PPS: it would be nice to write down an integer value in order to then display a graph of the availability of the pinged machine.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2014-07-09
@cbone

I think it would be right to write an external script that will climb to the cisco from the Zabbix server, receive data and send it to monitoring.
https://www.zabbix.com/documentation/en/2.0/manual...

H
hobbyte, 2014-07-10
@hobbyte

In my opinion, it would be more correct to use IP SLA (if there is support) with passive (trap) or active snmp result retrieval.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question