Zabbix: YLDar рдЯреАрдЬреА рд╕рд┐рдо рдХрд╛рд░реНрдб рдХреА рдПрд▓рдПрд▓рдбреА рдирд┐рдЧрд░рд╛рдиреА


рдХреБрдЫ рдорд╣реАрдиреЗ рдкрд╣рд▓реЗ, рдореИрдВрдиреЗ рдПрдХ Yeastar TG200 GSM рдЧреЗрдЯрд╡реЗ рдХрд╛ рдЕрдзрд┐рдЧреНрд░рд╣рдг рдХрд┐рдпрд╛ред рдЙрдкрдХрд░рдг рд╕реНрд╡рдпрдВ рдЕрдЪреНрдЫрд╛ рд╣реИ, рдЕрдВрдбрд╛ рдСрдкрд░реЗрдЯрд░ рдХрд╛ рдЙрд▓реНрд▓реЗрдЦ рдирд╣реАрдВ рдХрд░рдирд╛ рд╣реИ, рдЬреЛ рд╕рдордп-рд╕рдордп рдкрд░ рдПрдХ рд╕реБрдЕрд░ рджреЗрддрд╛ рд╣реИред рдЗрд╕рд▓рд┐рдП рд╕рд┐рдо-рдУрдХреЗ рдХреА рд╕реНрдерд┐рддрд┐ рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рдЕрдк-рдЯреВ-рдбреЗрдЯ рдЬрд╛рдирдХрд╛рд░реА рдФрд░ рдбрдВрдк рдХрд╛ рдЬрд╡рд╛рдм рджреЗрдиреЗ рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рдереАред рд╕рдорд╕реНрдпрд╛ рдХреЗрд╡рд▓ рдПрдХ рдЪреАрдЬ рд╣реИ: рдЗрд╕ рдЙрдкрдХрд░рдг рдореЗрдВ, рдЬреИрд╕рд╛ рдХрд┐ рдкреВрд░реА рд╢реНрд░реГрдВрдЦрд▓рд╛ рдореЗрдВ, рдПрд╕рдПрдирдПрдордкреА рдирд╣реАрдВ рд╣реИред рд▓реЗрдХрд┐рди рдПрдХ рдПрдкреАрдЖрдИ (рдПрдПрдордЖрдИ) рд╣реИред рдореБрдЭреЗ рдПрдХ рддреИрдпрд╛рд░ рд╕рдорд╛рдзрд╛рди рдирд╣реАрдВ рдорд┐рд▓рд╛, рдЗрд╕рд▓рд┐рдП рдореИрдВрдиреЗ рдЕрдкрдиреА рдмрд╛рдЗрдХ рдХреЛ рдЙрдкрдХрд░рдг рдХреЛ рдорддрджрд╛рди рдХреЗ рд▓рд┐рдП рдПрдХ рддрдВрддреНрд░ рдмрдирд╛рдиреЗ рдХрд╛ рдлреИрд╕рд▓рд╛ рдХрд┐рдпрд╛ред рдЬрд╝реИрдмрд┐рдХреНрд╕ рдХреА рд╕рднреА рдирд┐рдЧрд░рд╛рдиреА рдЗрд╕рдХреЗ рдЖрдзрд╛рд░ рдкрд░ рдмрдирд╛рдИ рдЬрд╛рдПрдЧреАред рдЗрд╕рдХреЗ рд▓рд┐рдП рдХреНрдпрд╛ рдЖрд╡рд╢реНрдпрдХ рд╣реИ:

  • рдЯреЗрдореНрдкрд▓реЗрдЯ
  • рд▓рд┐рдкрд┐
  • netcat nc (рдЙрдмрдВрдЯреВ рдкрд░ рдкреВрд░реНрд╡рд╕реНрдерд╛рдкрд┐рдд рд╣реИ)
  • рдбрд┐рд╡рд╛рдЗрд╕ рдкрд░ API рд╕рдХреНрд╖рдо рдХрд░реЗрдВ

рдЯреЗрдореНрдкрд▓реЗрдЯ


рдЯреЗрдореНрдкрд▓реЗрдЯ 4.2 рд╕рдВрд╕реНрдХрд░рдг рдХреЗ рдЖрдзрд╛рд░ рдкрд░ рдмрдирд╛рдпрд╛ рдЧрдпрд╛ рдерд╛, рд▓реЗрдХрд┐рди, рд╢рд╛рдпрдж, рдпрд╣ рдкрд╣рд▓реЗ рдХреЗ рд╕рдВрд╕реНрдХрд░рдгреЛрдВ рдкрд░ рдХрд╛рдо рдХрд░реЗрдЧрд╛ред рдореБрдЦреНрдп рдмрд╛рдд рдпрд╣ рд╣реИ рдХрд┐ рдЖрдкрдХрд╛ рд╕рдВрд╕реНрдХрд░рдг рдПрд▓рдПрд▓рдбреА рдирд┐рд░реНрднрд░ рддрддреНрд╡реЛрдВ рдХреЗ рдкреНрд░реАрдкреНрд░реЛрд╕реЗрд╕рд┐рдВрдЧ рдХрд╛ рд╕рдорд░реНрдерди рдХрд░рддрд╛ рд╣реИред
IMSI рдкрд░ рдмреЙрдХреНрд╕ рдбреЗрдЯрд╛ рд╕реЗ рдмрд╛рд╣рд░, рдПрд╕рдПрдордПрд╕ рд╕реЗрдВрдЯрд░, рдСрдкрд░реЗрдЯрд░, рд╕рд┐рдЧреНрдирд▓ рдХреА рд╢рдХреНрддрд┐, рд╕реНрдерд┐рддрд┐ рдФрд░ рдЕрдВрддрд┐рдо рдХрд╛рд░реНрд░рд╡рд╛рдИ рдХреА рдирд┐рдЧрд░рд╛рдиреА рдХреА рдЬрд╛рддреА рд╣реИред рдпрджрд┐ рдЖрдк рдЪрд╛рд╣реЗрдВ, рддреЛ рдЖрдк рд╡рд╛рдВрдЫрд┐рдд рд░реВрдкрд╛рдВрддрд░рдг рдХреЗ рд╕рд╛рде рдПрдХ рдФрд░ рдкреНрд░реЛрдЯреЛрдЯрд╛рдЗрдк рдмрдирд╛ рд╕рдХрддреЗ рд╣реИрдВред рдЗрд╕рдХреЗ рдЕрд▓рд╛рд╡рд╛ рдЯреЗрдореНрдкрд▓реЗрдЯ рдореЗрдВ рдХрдИ рдЯреНрд░рд┐рдЧрд░реНрд╕ рд╣реИрдВ, рдЬрд┐рд╕рдореЗрдВ рд╕рд┐рдо рдЗрдВрдЯрд░рдлреЗрд╕ рдореЗрдВ рдЧрд┐рд░рд╛рд╡рдЯ рдФрд░ рдЗрд╕рдХреЗ рдкреНрд░рддрд┐рд╕реНрдерд╛рдкрди рд╢рд╛рдорд┐рд▓ рд╣реИрдВред рдпрд╣ рдЙрд▓реНрд▓реЗрдЦрдиреАрдп рд╣реИ рдХрд┐ рдХреЗрд╡рд▓ рд╕рдореНрдорд┐рд▓рд┐рдд рд╕рд┐рдо рдХрд╛рд░реНрдб рдХрд╛ рдкрддрд╛ рд▓рдЧрд╛рдпрд╛ рдЬрд╛рддрд╛ рд╣реИред рдпрд╣ рдбрд┐рдЯреЗрдХреНрд╢рди рдлрд╝рд┐рд▓реНрдЯрд░ рдореЗрдВ рдЕрдХреНрд╖рдо рд╣реИ (рдЖрдк рдХрднреА рдирд╣реАрдВ рдЬрд╛рдирддреЗ, рд╢рд╛рдпрдж рдХрд┐рд╕реА рдХреЛ рдЗрд╕рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рд╣реИ)ред рдмреЗрд╢рдХ, рд╕реНрдХреНрд░рд┐рдкреНрдЯ рдХреЛ рдмрд╛рд╣рд░реА рд╢рдмреНрджреЛрдВ рдореЗрдВ рдЭреВрда рд╣реЛрдирд╛ рдЪрд╛рд╣рд┐рдП рдФрд░ рдЕрдиреНрдп рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛рдУрдВ рдХреЗ рдЕрдзрд┐рдХрд╛рд░реЛрдВ рдХреЛ рдирд┐рд╖реНрдкрд╛рджрд┐рдд рдХрд░рдирд╛ рдЪрд╛рд╣рд┐рдПред

рд╣рд╛рд░реНрдбрд╡реЗрдпрд░ - Yeastar TG.xml
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>4.2</version>
<date>2019-06-04T19:58:15Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Hardware - Yeastar TG</template>
<name>Hardware - Yeastar TG</name>
<description> SIM- Yeastar TG.&#13;
yeastar.sh&#13;
:&#13;
{$APIUSER} - API&#13;
{$APIPASS} - API&#13;
.</description>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>SIM</name>
</application>
</applications>
<items/>
<discovery_rules>
<discovery_rule>
<name>SIM-</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>yeastarsim.sh[discovery,{HOST.CONN},{$APIUSER},{$APIPASS}]</key>
<delay>1h</delay>
<status>0</status>
<allowed_hosts/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<filter>
<evaltype>1</evaltype>
<formula/>
<conditions>
<condition>
<macro>{#POWER}</macro>
<value>Power on</value>
<operator>8</operator>
<formulaid>A</formulaid>
</condition>
<condition>
<macro>{#STATUS}</macro>
<value>Undetected SIM Card</value>
<operator>9</operator>
<formulaid>B</formulaid>
</condition>
</conditions>
</filter>
<lifetime>3d</lifetime>
<description/>
<item_prototypes>
<item_prototype>
<name>SIM{#NUM} - IMSI</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>hardware.yeastar.sim.imsi[{#ID}]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>1</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SIM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>SIM IMSI: (.*)
\1</params>
<error_handler>0</error_handler>
<error_handler_params/>
</step>
</preprocessing>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<application_prototypes/>
<master_item>
<key>yeastarsim.sh[{#ID},{HOST.CONN},{$APIUSER},{$APIPASS}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>SIM{#NUM} - </name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>hardware.yeastar.sim.last[{#ID}]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>1</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SIM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>Last event: (.*)
\1</params>
<error_handler>0</error_handler>
<error_handler_params/>
</step>
</preprocessing>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<application_prototypes/>
<master_item>
<key>yeastarsim.sh[{#ID},{HOST.CONN},{$APIUSER},{$APIPASS}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>SIM{#NUM} - </name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>hardware.yeastar.sim.networkstatus[{#ID}]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>1</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SIM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>Network Status: (.*)
\1</params>
<error_handler>0</error_handler>
<error_handler_params/>
</step>
</preprocessing>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<application_prototypes/>
<master_item>
<key>yeastarsim.sh[{#ID},{HOST.CONN},{$APIUSER},{$APIPASS}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>SIM{#NUM} - </name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>hardware.yeastar.sim.operator[{#ID}]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>1</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SIM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>Network Name: (.*)
\1</params>
<error_handler>0</error_handler>
<error_handler_params/>
</step>
</preprocessing>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<application_prototypes/>
<master_item>
<key>yeastarsim.sh[{#ID},{HOST.CONN},{$APIUSER},{$APIPASS}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>SIM{#NUM} - </name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>hardware.yeastar.sim.signal[{#ID}]</key>
<delay>0</delay>
<history>7d</history>
<trends>30d</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SIM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>Signal Quality \(0,31\): (.*)
\1</params>
<error_handler>0</error_handler>
<error_handler_params/>
</step>
</preprocessing>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<application_prototypes/>
<master_item>
<key>yeastarsim.sh[{#ID},{HOST.CONN},{$APIUSER},{$APIPASS}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>SIM{#NUM} - SMS-</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>hardware.yeastar.sim.smscenter[{#ID}]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>1</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SIM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>SIM SMS Center Number: (.*)
\1</params>
<error_handler>0</error_handler>
<error_handler_params/>
</step>
</preprocessing>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<application_prototypes/>
<master_item>
<key>yeastarsim.sh[{#ID},{HOST.CONN},{$APIUSER},{$APIPASS}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>SIM{#NUM} - </name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>hardware.yeastar.sim.state[{#ID}]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>1</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SIM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>State: (.*)
\1</params>
<error_handler>0</error_handler>
<error_handler_params/>
</step>
</preprocessing>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<application_prototypes/>
<master_item>
<key>yeastarsim.sh[{#ID},{HOST.CONN},{$APIUSER},{$APIPASS}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>SIM{#NUM} - </name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>hardware.yeastar.sim.status[{#ID}]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>1</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SIM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>Status: .*, (.*), .*, .*
\1</params>
<error_handler>0</error_handler>
<error_handler_params/>
</step>
</preprocessing>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<application_prototypes/>
<master_item>
<key>yeastarsim.sh[{#ID},{HOST.CONN},{$APIUSER},{$APIPASS}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>SIM{#NUM} - Parsing</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>yeastarsim.sh[{#ID},{HOST.CONN},{$APIUSER},{$APIPASS}]</key>
<delay>2m</delay>
<history>1h</history>
<trends>0</trends>
<status>0</status>
<value_type>4</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SIM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<application_prototypes/>
<master_item/>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Hardware - Yeastar TG:hardware.yeastar.sim.imsi[{#ID}].diff()}=1 and {Hardware - Yeastar TG:hardware.yeastar.sim.status[{#ID}].regexp(Undetected SIM Card)}=0</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name> SIM{#NUM} {HOST.NAME}</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>2</priority>
<description/>
<type>0</type>
<manual_close>1</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Hardware - Yeastar TG:hardware.yeastar.sim.status[{#ID}].regexp(Undetected SIM Card)}=1</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name> SIM{#NUM} {HOST.NAME}</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>3</priority>
<description/>
<type>0</type>
<manual_close>1</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Hardware - Yeastar TG:hardware.yeastar.sim.state[{#ID}].regexp(SIM PIN REQ,#2)}=1</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name> PIN SIM{#NUM} {HOST.NAME}</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>3</priority>
<description/>
<type>0</type>
<manual_close>0</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Hardware - Yeastar TG:hardware.yeastar.sim.smscenter[{#ID}].regexp(.*,#2)}=0</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name> SMS- SIM{#NUM} {HOST.NAME}</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>2</priority>
<description/>
<type>0</type>
<manual_close>1</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Hardware - Yeastar TG:hardware.yeastar.sim.signal[{#ID}].avg(#3)}&lt;9</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name> SIM{#NUM} {HOST.NAME}</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>1</priority>
<description/>
<type>0</type>
<manual_close>1</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Hardware - Yeastar TG:hardware.yeastar.sim.status[{#ID}].regexp(Down,#2)}=1</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name> SIM{#NUM} {HOST.NAME}</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>4</priority>
<description/>
<type>0</type>
<manual_close>0</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
</trigger_prototypes>
<graph_prototypes>
<graph_prototype>
<name> SIM{#NUM}</name>
<width>900</width>
<height>200</height>
<yaxismin>0.0000</yaxismin>
<yaxismax>100.0000</yaxismax>
<show_work_period>1</show_work_period>
<show_triggers>1</show_triggers>
<type>0</type>
<show_legend>1</show_legend>
<show_3d>0</show_3d>
<percent_left>0.0000</percent_left>
<percent_right>0.0000</percent_right>
<ymin_type_1>0</ymin_type_1>
<ymax_type_1>0</ymax_type_1>
<ymin_item_1>0</ymin_item_1>
<ymax_item_1>0</ymax_item_1>
<graph_items>
<graph_item>
<sortorder>0</sortorder>
<drawtype>2</drawtype>
<color>1A7C11</color>
<yaxisside>0</yaxisside>
<calc_fnc>7</calc_fnc>
<type>0</type>
<item>
<host>Hardware - Yeastar TG</host>
<key>hardware.yeastar.sim.signal[{#ID}]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
<host_prototypes/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<lld_macro_paths/>
<preprocessing/>
<master_item/>
</discovery_rule>
</discovery_rules>
<httptests/>
<macros/>
<templates/>
<screens/>
<tags/>
</template>
</templates>
</zabbix_export>


рд▓рд┐рдкрд┐


yeastarsim.sh
#!/bin/bash
# 2019/05/24 AcidVenom v1.0
# LLD- SIM- API Yeastar Zabbix
# : $discovery_2_3_etc $IP $APIUSER $APIPASS
# SIM-
# - discovery
IFS=$'\n'
JSON="{\"data\":["
SEP=""
if [[ $1 = "discovery" ]]
then
get=`echo -e "Action: Login\nUsername: $3\nSecret: $4\n\nAction: smscommand\nCommand: gsm show spans\n\nAction: Logoff\n\n" | nc $2 5038 | grep "span [0-9]*:"`
for pool in $get
do
id=`echo $pool | sed "s/.* span //g" | sed "s/:.*//g"`
num=$(($id-1))
power=`echo $pool | grep "span [0-9]*:" | sed "s/.*: //g" | sed "s/,.*//g"`
status=`echo $pool | grep "span [0-9]*:" | sed "s/.*: //g" | sed "s/^.*, \(.*\), .*, .*/\1/g"`
JSON=$JSON"$SEP{\"{#ID}\":\"$id\", \"{#NUM}\":\"$num\", \"{#POWER}\":\"$power\", \"{#STATUS}\":\"$status\"}"
SEP=", "
done
JSON=$JSON"]}"
echo $JSON
# SIM-
# - discovery ("2", "3" ..)
else
echo -e "Action: Login\nUsername: $3\nSecret: $4\n\nAction: smscommand\nCommand: gsm show span $1\n\nAction: Logoff\n\n" | nc $2 5038
fi
view raw yeastarsim.sh hosted with тЭд by GitHub


рд╕реНрдХреНрд░рд┐рдкреНрдЯ рдирд┐рдореНрди рдкреИрд░рд╛рдореАрдЯрд░ рдкреНрд░рд╛рдкреНрдд рдХрд░рддреА рд╣реИ:
$ 1 - рдЦреЛрдЬ рдпрд╛ рдЕрд╡рдзрд┐ рд╕рдВрдЦреНрдпрд╛ рдЬреЛ рдЦреЛрдЬ рдХрд╛ рдкрддрд╛ рд▓рдЧрд╛рдПрдЧреА
$ 2 - {HOST.CONN} - рдиреЛрдб рдкрддрд╛
$ 3 - {$ APIUSER} - рдПрдкреАрдЖрдИ рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рдирд╛рдо
$ 4 - {$ APIPASS} - рдПрдкреАрдЖрдИ рдкрд╛рд╕рд╡рд░реНрдб

рдЦреЛрдЬ рдЕрдиреБрд░реЛрдз рдкрд░, рд╕реНрдХреНрд░рд┐рдкреНрдЯ JSON рдХреЛ рд╕рднреА рд╕рд┐рдо-рдХрд╛рд░реНрдб, рдЙрдирдХреА рд╕реНрдерд┐рддрд┐, рд╕реНрдкреИрди рдФрд░ рд╕рдВрдЦреНрдпрд╛ (рдкрдардиреАрдпрддрд╛ рдХреЗ рд▓рд┐рдП рдХрдо) рдХреЗ рд╕рд╛рде рджреЗрддрд╛ рд╣реИред рд╕реНрдкреИрди рдХреЗ рдЕрдиреБрд░реЛрдз рдкрд░, рдкрд╛рд░реНрд╕рд┐рдВрдЧ рдХреЗ рд▓рд┐рдП рд╕реЗрдВрд╕рд░рд╢рд┐рдк рдХреЗ рдмрд┐рдирд╛ рдкреВрд░реА рдЬрд╛рдирдХрд╛рд░реАред

рдЗрд╕рд▓рд┐рдП, рд╕рд╣реА рд╕рдВрдЪрд╛рд▓рди рдХреЗ рд▓рд┐рдП, рдЖрдкрдХреЛ рдкреНрд░рддреНрдпреЗрдХ рдиреЛрдб рдореЗрдВ рдореИрдХреНрд░реЛ {$ APIUSER} рдФрд░ {$ APIPASS} рдирд┐рд░реНрджрд┐рд╖реНрдЯ рдХрд░рдиреЗ рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рд╣реИ, рдЬрд┐рд╕рд╕реЗ рдпрд╣ рдЯреЗрдореНрдкрд▓реЗрдЯ рдЬреБрдбрд╝рд╛ рд╣реБрдЖ рд╣реИред рдпрджрд┐ рдЗрд╕ рддрд░рд╣ рдХреЗ рдореИрдХреНрд░реЛрдЬрд╝ рдкрд╣рд▓реЗ рд╕реЗ рдореМрдЬреВрдж рд╣реИрдВ, рддреЛ рдЙрдиреНрд╣реЗрдВ рдЯреЗрдореНрдкрд▓реЗрдЯ рдореЗрдВ рдирд╛рдо рдмрджрд▓реЗрдВ, {$ TGAPIUSER} рдФрд░ {$ TGAPIPASS} рдХреЛ рдХрд╣реЗрдВред рдпрджрд┐ рдЖрдк рд╕рднреА рдЧреЗрдЯрд╡реЗ рдкрд░ рдПрдкреАрдЖрдИ рдХреЗ рд▓рд┐рдП рд╕рдорд╛рди рдкрд╛рд╕рд╡рд░реНрдб рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рддреЗ рд╣реИрдВ, рддреЛ рд╡реИрд╢реНрд╡рд┐рдХ рдореИрдХреНрд░реЛрдЬрд╝ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░реЗрдВред рдореИрдВ рджреЛрд╣рд░рд╛рддрд╛ рд╣реВрдВ, рдЧреЗрдЯрд╡реЗ рдХрд┐рдирд╛рд░реЗ рдкрд░ рдПрдкреАрдЖрдИ рдХреЛ рд╕рдХреНрд░рд┐рдп рдХрд┐рдпрд╛ рдЬрд╛рдирд╛ рдЪрд╛рд╣рд┐рдП, рдХреНрд░реЗрдбреЗрдВрд╢рд┐рдпрд▓реНрд╕ рд╕рд╣реА рд╣реЛрдирд╛ рдЪрд╛рд╣рд┐рдПред

рдмреЛрдирд╕


рдПрдХ рдмреЛрдирд╕ рдХреЗ рд░реВрдк рдореЗрдВ, рдореИрдВ Zabbix рд╕реЗ рдПрд╕рдПрдордПрд╕ рднреЗрдЬрдиреЗ рдХреЗ рд▓рд┐рдП рдПрдХ рд╕реНрдХреНрд░рд┐рдкреНрдЯ рдЫреЛрдбрд╝ рджреВрдВрдЧрд╛ред рд╕реНрдХреНрд░рд┐рдкреНрдЯ рдХреЛ рдЕрд▓рд░реНрдЯрд╕реНрдХреНрд░рд┐рдкреНрд╕ рдлрд╝реЛрд▓реНрдбрд░ рдореЗрдВ рдбрд╛рд▓рд╛ рдЬрд╛рдирд╛ рдЪрд╛рд╣рд┐рдП рдФрд░ рдЕрдиреНрдп рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛рдУрдВ рдХреЛ рдирд┐рд╖реНрдкрд╛рджрд┐рдд рдХрд░рдиреЗ рдХреА рдЕрдиреБрдорддрд┐ рджреА рдЬрд╛рдиреА рдЪрд╛рд╣рд┐рдПред

yeastarsms.sh
#!/bin/bash
# AcidVenom 2019/05/20 v1.0
# SMS API Yeastar
# : $IP $APIUSER $APIPASS $SPAN $PHONE $MESSAGE
span=$(($4+1))
# SMS
echo -e "Action: Login\nUsername: $2\nSecret: $3\n\nAction: smscommand\nCommand: gsm send sms $span $5 \"$6\"\n\nAction: Logoff\n\n" | nc $1 5038
view raw yeastarsms.sh hosted with тЭд by GitHub


рдЗрд╕рдХреЗ рдмрд╛рдж, рд╡реНрдпрд╡рд╕реНрдерд╛рдкрди тЖТ рдЕрд▓рд░реНрдЯ рдореЗрдердбреНрд╕ тЖТ рдПрдХ рдЕрд▓рд░реНрдЯ рдореЗрдердб рдмрдирд╛рдПрдБ рдФрд░ рд╕реНрдХреНрд░рд┐рдкреНрдЯ рдЪреБрдиреЗрдВред рд╕реНрдХреНрд░рд┐рдкреНрдЯ рдХрд╛ рдирд╛рдо рдлрд╝рд╛рдЗрд▓ рдХреЗ рдирд╛рдо рд╕реЗ рдореЗрд▓ рдЦрд╛рдирд╛ рдЪрд╛рд╣рд┐рдП (рдореЗрд░реЗ рдорд╛рдорд▓реЗ рдореЗрдВ, yeastarsms.sh)ред рд╕реНрдХреНрд░рд┐рдкреНрдЯ рд╕реНрд╡рдпрдВ рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдЪрд░ (рдкреИрд░рд╛рдореАрдЯрд░) рдХреЛ рд╕реНрд╡реАрдХрд╛рд░ рдХрд░рддреА рд╣реИ:

$ 1 - рдЧреЗрдЯрд╡реЗ рдХреЗ рдЖрдИрдкреА рдпрд╛ рдбреАрдПрдирдПрд╕
$ 2 - рдПрдкреАрдЖрдИ рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рдирд╛рдо
$ 3 - рдПрдкреАрдЖрдИ рдкрд╛рд╕рд╡рд░реНрдб
$ 4 - рд╕рд┐рдо рдкреЛрд░реНрдЯ рдЬреИрд╕рд╛ рд╣реИ (рдЙрджрд╛рд╣рд░рдг 1 рдХреЗ рд▓рд┐рдП)
$ 5 - рдкреНрд░рд╛рдкреНрддрдХрд░реНрддрд╛ (рдореИрдВ {ALERT.SENDTO} рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рддрд╛ рд╣реВрдВ)
$ 6 - рд╕рдВрджреЗрд╢ (рдореИрдВ {ALERT.SUBJECT} рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рддрд╛ рд╣реВрдВ)
рдорд╛рдкрджрдВрдбреЛрдВ рдХреЗ рдХреНрд░рдо рдХреЛ рдмрджрд▓рддреЗ рд╕рдордп, рд╕реНрдХреНрд░рд┐рдкреНрдЯ рдХрд╛рдо рдирд╣реАрдВ рдХрд░реЗрдЧреА ред

рдореБрдЭреЗ рд╕реБрдЭрд╛рд╡реЛрдВ рдФрд░ рдЯрд┐рдкреНрдкрдгрд┐рдпреЛрдВ рдкрд░ рдЦреБрд╢реА рд╣реЛрдЧреАред

рдкреБрдирд╢реНрдЪ: рд╕рд┐рдо рдкреНрд░рддрд┐рд╕реНрдерд╛рдкрди рдФрд░ рд╣рдЯрд╛рдиреЗ рдХреЗ рд▓рд┐рдП рд╕рдВрд╢реЛрдзрд┐рдд рдЯреНрд░рд┐рдЧрд░ред рдЯреЗрдореНрдкрд▓реЗрдЯ рдбрд╛рдЙрдирд▓реЛрдб рдХрд░реЗрдВред

Source: https://habr.com/ru/post/hi454702/


All Articles