Ad Widget

Collapse

Use Agent as Central SNMP reporting tool - 1 Agent for Multiple SNMP HOSTS

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ModularConfusion
    Junior Member
    • Apr 2024
    • 23

    #1

    Use Agent as Central SNMP reporting tool - 1 Agent for Multiple SNMP HOSTS

    What we are currently doing
    We manage many networks, and on each network we have a single windows machine that gets about 10 SNMP values from a handful of devices and forwards it to the zabbix server. Each device has its own "host" in zabbix (as they are all full-fledged devices in different locations on a shared network).

    This works, but the script only runs on windows, checks one value at a time, cannot update faster than once ever 4 seconds or so, and if there is a loss in connection, none of that data is stored and sent to the server.

    What we would like to do
    Ideally, we have a zabbix agent running in a docker container on a small linux machine which can perform this task using the agent so that data can be cached and sent in compressed chunks, and so that if the server connection is lost, the data will propogate on reconnect.

    The Issue We are Facing
    The issue is that any data the zabbix agent captures seemingly can only be applied to itself. What I mean is that all of these values are applied to the management machine, instead of being applied as values to individual hosts for each of the SNMP-only devices.

    For example, if I am to have
    Code:
    UserParameter=Status,(Command to get the status of one of the network devices)
    in the agent's config, that sets the management machine's "Status" key to the result instead of the host we set up for the networked device.

    Any advice?

    What we CANNOT do
    1. We cannot install the zabbix agent on the devices we want to monitor. They do not have access to the public internet and do not run a full capable linux system
    2. We cannot set up zabbix servers on each of these networks. We need a centralized system to monitor the 50+ clients we have.
    3. Because of the above limitations, we cannot access the devices via SNMP directly from the zabbix server, as it is on a different LAN.

    Diagram of the types of networks we connect to
    zz0.dcve073lgxkzz

  • Answer selected by markfree at 13-07-2024, 01:28.
    rd67
    Junior Member
    • Jul 2024
    • 8

    Cant you install linux/zabbix-proxy on each windows machines, using hyper-v?
    The windows machines would send the checks results to the proxies, running on the same machines. The proxies would then send the data to the zabbix server.
    Not sure it's feasible/would meet you're requirements, as i'm very new to Zabbix and i don't know the zabbix proxy features and limitations.

    Not clear to me from your post if you're stuck with windows. If not, you could go directly with linux/zabbix-proxies installed on bare metal
    Last edited by rd67; 12-07-2024, 18:42.

    Comment

    • rd67
      Junior Member
      • Jul 2024
      • 8

      #2
      Cant you install linux/zabbix-proxy on each windows machines, using hyper-v?
      The windows machines would send the checks results to the proxies, running on the same machines. The proxies would then send the data to the zabbix server.
      Not sure it's feasible/would meet you're requirements, as i'm very new to Zabbix and i don't know the zabbix proxy features and limitations.

      Not clear to me from your post if you're stuck with windows. If not, you could go directly with linux/zabbix-proxies installed on bare metal
      Last edited by rd67; 12-07-2024, 18:42.

      Comment

      • ModularConfusion
        Junior Member
        • Apr 2024
        • 23

        #3
        Originally posted by rd67
        Cant you install linux/zabbix-proxy on each windows machines, using hyper-v?
        The windows machines would send the checks results to the proxies, running on the same machines. The proxies would then send the data to the zabbix server.
        Not sure it's feasible/would meet you're requirements, as i'm very new to Zabbix and i don't know the zabbix proxy features and limitations.

        Not clear to me from your post if you're stuck with windows. If not, you could go directly with linux/zabbix-proxies installed on bare metal

        Hi rd67, thanks for the reply.

        I was not aware of the zabbix-proxy service, that may be what we go with. We're not stuck with Windows; the only reason we are currently using Windows is because our zabbix sender script is Windows only. A new solution would allow us to migrate to linux.


        Comment

        • ModularConfusion
          Junior Member
          • Apr 2024
          • 23

          #4
          Was able to use the zabbix proxy and sqlite3 docker images to connect back to the server. This is allowing me to add devices as if Im on a LAN. Thanks!

          Comment

          • markfree
            Senior Member
            • Apr 2019
            • 868

            #5
            If your Windows is updated, I would suggest you to use Windows WSL, which is something like a Linux container. Then, you could run the Zabbix Proxy on it.
            This would allow you to monitor remote networks and, as you said, add your SNMP devices to Zabbix independently.

            Comment

            • rd67
              Junior Member
              • Jul 2024
              • 8

              #6
              markfree
              a question not specific to zabbix: on WSL can you have linux services run at windows boot and without user login?

              Comment

              • markfree
                Senior Member
                • Apr 2019
                • 868

                #7
                Yes, I think so.
                You can probably create a scheduled command that lauches your WSL instance and services.
                I'm afraid I don't really know how, but a web search should give you many options (something like "windows wsl auto start").

                I would advise making sure that SystemD is configured in your instance and that your Linux service is enabled ("systemctl enable").

                Comment

                • ModularConfusion
                  Junior Member
                  • Apr 2024
                  • 23

                  #8
                  Unfortunately WSL really doesnt support automatically starting services. We found it was very unstable. We had a workaround to have a batch file start a WSL session and leave it open, but even then sometimes after a week of it running fine it'd just loose internet connectivity and we'd have to restart wsl to make it work.

                  We've ended up just buying and deploying 1U mini pcs with ubuntu.

                  Comment

                  Working...