Ad Widget

Collapse

Port scan template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stelben
    Junior Member
    • Aug 2014
    • 16

    #1

    Port scan template

    Hi!

    I have some 100-150 routers that I need to monitor in different ways.
    Most of them can be monitored by using an item key like:
    net.tcp.service[tcp,<ip>,80]
    The ports may vary between 10-15 different ports.
    Ping does not work in all cases.

    I have tried to create a template with discovery rules that would TCP a port, if detected as UP I want to create an item and a trigger to that.
    If multiple ports are open I'm fine with monitoring several ports on the same host.

    Can I do that without too much hassle?
    I haven't succeeded and I'm out of ideas I'm looking for a solution without a special script on the Zabbix server, if possible.

    Any idea would be very much appreaciated, thanks!
  • allexpetrov
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2017
    • 361

    #2
    Hello,

    As per documentation - the Low Level discovery needs to receive the valid JSON output. I would like to suggest to use LLD based on SNMP. For example:

    TCP via SNMP: tcpConnLocalPort or 1.3.6.1.2.1.6.13.1.3
    UDP via SNMP: udpLocalPort or 1.3.6.1.2.1.7.5.1.2

    Create a discovery and then create item/trigger/graph prototype with corresponding LLD macro like {#TCPPORT} to perform your check. ]

    More about SNMP and LLD: https://www.zabbix.com/documentation...y_of_snmp_oids

    Note: You need to refer the router's manual or simply by performing {{snmpwalk}} through that router.

    Regards,
    Alex!

    Comment

    • stelben
      Junior Member
      • Aug 2014
      • 16

      #3
      Thank you very much for your reply!

      These hosts that I need to monitor are external routers/firewall/etc to which I have no SNMP-access.
      It's strictly TCP to a port. If a session is established = UP.

      Just like net.tcp.service[tcp,<ip>,80] will do.

      I want to create a discovery rule that scans 10-15 predefined ports and creates items for each port that responds.

      Comment

      • allexpetrov
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2017
        • 361

        #4
        Ok I see now,

        In such case the only solution is to search something in htps://share.zabbix.com or you can try to use script which will use zabbix_sender to pass the JSON to Zabbix.

        I didn't had time to check, but I believe that there is a chance to nmap the host, put output into regular nmap's .xml and then convert it to the JSON format. Next - pass it to Zabbix.

        Regards,
        Alex!

        Comment

        Working...