Ad Widget

Collapse

Add services for Active only checks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • klandos
    Junior Member
    • Sep 2024
    • 7

    #1

    Add services for Active only checks

    Hello,

    I would like to monitor a couple (like 50) of raspberrys which are in different locations and always behind a firewall / NAT.

    For this I set up a public Zabbix service with port 10051 open.

    I ran into the problem with the actual none working zabbix-agent2 not starting due to a bug on arm and switched back to Zabbix-agent (1).
    This may be fixed in the next release until then I would use the Zabbix-agent (1).

    Configuring the server agent wise and also add a host on the server works flawlessly.
    I added the active template and can see basic stuff like filesystem, load, cpu and so on.

    Now I'm getting stuck:
    - When I add f.e. the "apache by agent" template I get an error:
    • Cannot inherit item with key "net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT }"]" of template "Apache by Zabbix agent" to host "test01hostname", because a host interface of type "Agent" is required.
    Which seems to me that this is a passive only template because the server wants to reach the client through the interface.
    Am I wrong? How can I fix this or force active checks?

    - I would like to monitor if a process is up and working, there are guidelines, but everything themes to be for passive mode!?

    - I would like to monitor some MQTT Topics running on the local raspberry broker. Regarding this: https://www.zabbix.com/de/integrations/mqtt it's easy only possible with zabbix-agent2,
    regarding this: https://support.zabbix.com/si/jira.i...ZBX-24619.html
    when will be the 7.0.4 available? Are we talking about days or weeks?

    thanks in advance!
  • kamil1
    Member
    • Aug 2024
    • 40

    #2
    Hi,
    1. The "Apache by Zabbix Agent" template you're trying to use is designed for passive checks. The item net.tcp.service.perf belongs to so called Simple checks (see here https://www.zabbix.com/documentation.../simple_checks). I do not find the active check equivalent; however you could use the 'UserParameter' functionality, for a reference, see here: https://www.zabbix.com/documentation...userparameters.
      The following might be useful if you decide to use UserParameter:
      UserParameter=your.tcp.check,echo | timeout 1 nc -zv $1 $2 >/dev/null 2>&1 && echo 1 || echo 0
      And then in the item config: your.tcp.check[<hostname>,<port>]
    2. To monitor processes with active checks, you can use proc.num[process_name] in your active item config.
    3. Zabbix 7.0.4 is expected to be released in the end of this September.

    Comment

    • klandos
      Junior Member
      • Sep 2024
      • 7

      #3
      Thanks for your response, I would like to test a bit till the new client is released.
      But building from source with go 1.23. doesn't work...
      Code:
      wget https://cdn.zabbix.com/zabbix/sources/release_candidates/7.0/zabbix-7.0.4rc1.tar.gz
      ./configure
      ./configure --enable-agent2
      sudo apt-get install libpcre++-dev
      sudo make install
      Code:
      # runtime/cgo
      
      In file included from _cgo_export.c:4:
      
      cgo-gcc-export-header-prolog:31:14: error: size of array ‘_check_for_64_bit_pointer_matching_GoInt’ is negative
      
      make[3]: *** [Makefile:625: bin/zabbix_agent2] Fehler 1
      ​
      sitting on a fresh installed Raspbian 11

      Comment

      • klandos
        Junior Member
        • Sep 2024
        • 7

        #4
        Hi,

        update on this

        actual Zabbix version works on raspberry.
        Creating Items on the Host side which use MQTT also.

        Is there any way how I could create an item from the client side?
        I mean I have the UserParameter, but I still have to create the corresponding Item on the host side.
        Any way around that? The clients are only available through active checks, that's why a item.prototype + discovery doesn't work or am I missing something?

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          Active item can provide data for a discovery just as well as passive...

          And your apache issue,, just change items from "agent passive" to "Agent active" and use it... they should work either way.
          net.tcp.service... items are agent checks aswell https://www.zabbix.com/documentation...et.tcp.service I am not sure how it is not possible to find that reference as said above... did chatgpt fail to find an answer? :P

          Comment

          • klandos
            Junior Member
            • Sep 2024
            • 7

            #6

            Hi,

            I'm still stuck on the "submit MQTT from the client" instead of configuring Items in templates.

            Unfornately chatgpt fail to help, but I'm sure human power can give me the final hint

            I think the right way would be to create a discovery rule containing the wildcard topic!?
            After that creating an item prototype!? Where to put the macro in?
            But here I get stuck. An example on how to get items auto created based on a wildcard topic like:

            mysensors/+/mymessage

            Where the + is a number would be really really great.

            Would after that works create a Tutorial if there is an wiki where we could place that. Can't believe I'm the first struggling with this .

            Comment

            • klandos
              Junior Member
              • Sep 2024
              • 7

              #7
              Bump on this.
              Is this such a uncommon wish or so damn simple that I Dont't get it?

              Comment

              Working...