Ad Widget

Collapse

Automatically add an agent interface after discovering a switch with snmp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chaispaquichui
    Junior Member
    • Mar 2020
    • 5

    #1

    Automatically add an agent interface after discovering a switch with snmp

    Hello everyone,

    I'm currently scanning my switches with SNMP to discover them and add them in zabbix

    Everything is working fine but there is some statistics who are not available through snmp

    My current solution is to use a Linux Server with the Zabbix agent. The agent execute a python script who connect to the switch, run the command, format the output and print a json.

    I'm currently using system.run to launch the script :

    Click image for larger version

Name:	Sans titre.png
Views:	561
Size:	18.8 KB
ID:	397929

    It's working but there is a small issue : if I want to use system.run, I need to manually configure an agent interface with the IP of the remote server on each switch

    Click image for larger version

Name:	Sans titre.png
Views:	518
Size:	30.7 KB
ID:	397930

    Is there any way to automatise this process ? I will have 100-150 switches to monitor at some point, it would be great if Zabbix could to it automaticaly

    If I'm not doing this correctly and there is a simpler solution, don't hesitate to correct me

    Thanks everyone !
  • chaispaquichui
    Junior Member
    • Mar 2020
    • 5

    #2
    After some investigations, it's possible to use the API to add the switches with multiple interfaces. Ansible is able to do the trick

    Comment

    Working...