networking - How to monitor network card link status in zabbix -


i need monitor physical interfaces link status in zabbix, , wondering, if there internal zabbix check that, or need write own. if so, how determine if there cable plugged in network card, , there voltage in interface.

so yes userparameter (even in zabbix 3.0) , it's reasonably easy setup, @ least on modern linux boxes. parametrizing userparameter (if follow...), it's possible define single parameter support monitoring of multiple nics; here's how:

  1. on target box, locate agent's directory userparamter definitions stored, smth /etc/zabbix/zabbix_agentd.d/
  2. create new file definition or amend existing one; did this:

    cat > /etc/zabbix/zabbix_agentd.d/userparameter_niclink.conf << eof userparameter=net.if.link[*],cat /sys/class/net/$1/carrier eof 
  3. restart agent, eg: service zabbix-agent restart
  4. in zabbix ui, create item against host follows:
    • type: zabbix agent (active if appropriate).
    • key: has actual nic monitored between brackets, eg: net.if.link[em1],
    • type of information: numeric (unsigned); data type: decimal
    • show value: "service state" (displays them "up/down")
    • application: network interfaces

that's it; go latest data; wait 30 secs or , nic state should start populating. might useful define trigger against item alerted if link goes down.

here other ways detect nic link's state; above cat /sys/class/net/${nic}/carrier works me (ubuntu 14.04 server, physical nic).


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -