Ad Widget

Collapse

Monitoring host via Zabbix Agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DiegoUy91
    Junior Member
    • Jul 2019
    • 2

    #1

    Monitoring host via Zabbix Agent

    Hi,

    First of all sorry about my english, i have been a while without writing in english so im getting some help from google translate.
    In the place i work, we got a zabbix servers that its working in a vlan called "Management". In that vlan there are many devices (most of all servers) that we want to monitor.
    One of that devices is a cameras servers, that contains the software for the management of the ip cameras that we have install in the building and of course contains zabbix agent too. Of course this ip cameras and the camera server are on the same subnet, so the camera server it's reacheable from zabbix servers and also can reach the cameras ip. The problem is that zabbix server can't reach any ip cameras and thats because of the network diagram and by policy it can not be change that, so i need a way to, at least, send a ping to each camera from the camera servers (maybe a script from zabbix agent install on the camera server) and send the exit code of that ping (or script) to the zabbix server.

    Do you think thats the best solution for my problem? Or maybe exists other solution that anyone could help me to deploy?


    Thank you!
  • WytheNet
    Junior Member
    • Jul 2017
    • 6

    #2
    1、add userparameter at agent server(camera server)
    Code:
    shell
    
    echo "Timeout=5
    UserParameter=icmp.time[*],ping "'$1'" -c 5 -i 0.2 | grep rtt | awk '{print "'$$4'"}'| awk -F/ '{print "'$$2'"}'
    UserParameter=icmp.lost[*],ping "'$1'" -c 5 -i 0.2 | grep packet | awk '{print "'$$6'"}\' | grep -Eo '[[:digit:]]'
    " > /etc/zabbix/zabbix_agentd.conf.d/icmp.conf
    
    service zabbix-agent restart
    2、add template at zabbix server
    key = icmp.time[<camera IP>]
    key = icmp.lost[<camera IP>]

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #3
      Take a look at https://www.zabbix.com/documentation...s/zabbix_agent and pay attention to net.tcp.port[<ip>,port] and net.tcp.service[service,<ip>,<port>] keys. May be IP_camera have http port open so you can monitoring its availability or something.

      Comment

      • DiegoUy91
        Junior Member
        • Jul 2019
        • 2

        #4
        Hi guys! Sorry for my late answer and thank you for your replies! Im going to take note about the code and im going to try it.
        After my post i was thinking that i forgot one big detail, the camera server it's a WS2012 R2. i clarify this because i see the code it's a shell script and the path it's from unix based OS.

        Comment

        • Hamardaban
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • May 2019
          • 2713

          #5
          As a workaround -just find grep and awk for Windows! (https://answers.microsoft.com/en-us/...4-38c60c0ca397)

          Comment

          Working...