Ad Widget

Collapse

Two different Host Interfaces

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vladvvtesla
    Junior Member
    • Jan 2019
    • 9

    #1

    Two different Host Interfaces

    Hello!

    There is a CCD-camera. Camera's IP-address is 10.6.1.1
    CCD-camera is connected to PC with Linux. PC's IP-address is 192.168.1.21
    The images, obtained by this ССD, are uploaded into Database. DBServer's IP-address is 192.168.1.40

    1) I created a Host with "Name: CCD-camera" and "Agent interfaces: 192.168.1.40"

    2) To get a last image time I created the Item. I added to zabbix_agentd.conf on 192.168.1.40 next UserParameter
    # Last Image Time
    UserParameter=get.imtime[*],/etc/zabbix/scripts/lastimtime.py -i $1 -c $2 -m $3
    It works perfectly
    /etc/zabbix/scripts/lastimtime.py -i 192.168.1.40 -c 12345 -m time
    2019-08-10 13:49:53.657000

    3) To check a Simple Ping of this camera I created another Item. I added to zabbix_agentd.conf on 192.168.1.21 next UserParameter
    # Simple Ping
    UserParameter=simpleping[*], ping -c 1 $1 >/dev/null 2>&1 && echo 1 || echo 0

    It doesn't work.
    It works only if I set "Agent interfaces: 192.168.1.21" on Host "CCD-camera"
    However, in this case, I cannot get the value of the Item "Last image time".

    I tried to use several agent interfaces "Agent interfaces: 192.168.1.21, 192.168.1.40" on Host "CCD-camera". It doesn't work.
    I tried to use UserParameter=...lastimtime.py... on PC 192.168.1.21.
    It doesn't work, because I cannot install and import a library psycopg2, which is used in the script lastimtime.py

    How can I get items "Last image time" and "Simple Ping" from the Host "CCD-camera"?
  • vladvvtesla
    Junior Member
    • Jan 2019
    • 9

    #2
    I found it!

    I added to the host "CCD camera" the new interface 192.168.10.21
    After applying a template -
    Configuration - Host - "CCD camera" - Items - Template Simple Ping: "simple_ping"
    There choosed "Host interface" - "192.168.10.21: 10050"

    Now the item "simple_ping" is figured out by the zabbix_agent on 192.168.10.21, and
    the item "Last Image Time" is figured out by the zabbix_agent on the default interface 192.168.10.40


    Comment

    Working...