Ad Widget

Collapse

Discussion thread for official Zabbix Template for Linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AlexL
    Zabbix Certified Specialist
    Zabbix Certified Specialist
    • Aug 2019
    • 55

    #1

    Discussion thread for official Zabbix Template for Linux

    This thread is designed to provide grounds for discussion of the official Zabbix Template for Linux.
    The template and details of the template are available in GIT repository.

    Passive Agent - https://git.zabbix.com/projects/ZBX/...os/linux_agent
    Active Agent - https://git.zabbix.com/projects/ZBX/...x_agent_active
    Prometheus Exporter -https://git.zabbix.com/projects/ZBX/.../os/linux_prom

    Zabbix is always looking for ways to improve our services and to make our users happier.
    We pride ourselves on doing our best each and every day, but we know that there is always something more to learn.
    We would like to hear back from you to know what have you liked and what would you improve in the template.
    Last edited by AlexL; 03-10-2019, 12:01. Reason: linux
  • niumar
    Junior Member
    • Sep 2009
    • 25

    #2
    Hello, I may not be understanding clearly, but what Interface Speed ​​has to do with Interface Type. Please take a look at the trigger "Interface {#IFNAME}: Ethernet has changed to lower speed than it was before" in the Interface discovery rules of the "Template Module Linux network interfaces by Zabbix agent".
    According to this trigger descrition, I'm expect, for exemple, a change in speed from 1000 Mbps to 100 Mbps to the same type of interface.

    Looking at the documentation for item "Interface {#IFNAME}: Type", interface types may change from, for example, 10M Ethernet to Frame Relay. In this situation, the speed will really change, but also new items will be discovered since the interface name will also change.

    Maybe the trigger should checking file "/sys/class/net/<#IFNAME>/speed" instead of the file "/sys/class/net/<#IFNAME>/type".

    If I'm getting it wrong, please ignore it.
    Last edited by niumar; 06-11-2019, 21:30.

    Comment

    • Starko
      Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Aug 2012
      • 93

      #3
      I just discovered, that the official Linux Template uses a Master Item (Text)
      Code:
      Get /proc/diskstats
      and the history setting for the JSON Master Item
      Code:
      Do not keep history
      isn't enabled. Isn't this considered a best practice for JSON based master items? Thanks for clarification.

      Comment

      • Kos
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Aug 2015
        • 3408

        #4
        The vfs.dev.discovery metric on my system returns the following devices with {#DEVTYPE}":"disk" in the list:
        • dvd
        • cdrw
        • cdrom
        • sr0
        • sda1
        • sda2
        • sda3
        • sda4
        • sda
        This metric is used by the "Block devices discovery" LLD rule.
        As I understand, the "sdaN" and "sr0" devices are filtered due to regular expression contained in {$VFS.DEV.DEVNAME.NOT_MATCHES} macro.
        However, the first 3 devices (dvd/cdrw/cdrom) are not filtered by this regular expression. Moreover, the files "/sys/block/{#DEVNAME}/stat" also do not exist for these devices (these files are used as the master-item prototype "{#DEVNAME}: Get stats" for all other item prototypes).

        So, probably, these 3 devices (dvd/cdrw/cdrom) also should be added as exclusion to regular expression in the standard template (to {$VFS.DEV.DEVNAME.NOT_MATCHES} macro).

        Comment

        • ali.yahyaoui
          Junior Member
          • Feb 2021
          • 1

          #5
          Hi everyone,
          I just install node_exporter in my host to get more stats about networks with the `Template OS Linux by Prom`, i import template_os_linux_prom.xml to zabbix web-interface to update the default one but it still not updated.
          Note that my zabbix-server version : 5.0.8.

          Comment

          • b.e
            Junior Member
            • Dec 2020
            • 1

            #6
            I'm using the "active" agent on numerous Linux boxes, OpenWRT, and OpnSense, and none of these platforms collect network interface speed. (This also means automatic utilization calculations aren't possible.)

            Why is this, and what can be done to enable the agent to collect interface speed?

            Comment

            • jlusky
              Junior Member
              • Apr 2021
              • 1

              #7
              I think everyone that installs a Zabbix agent on a big machine runs into the default "Too many processes running on {HOST.NAME}" trigger, which has a static default value. This trigger is pretty useless unless is is tuned to each host. What would be REALLY USEFUL as a default is some way to compare it to system.cpu.num... ie, something like {Template OS Linuxroc.num[,,run].avg(5m)}>({Template OS Linux:system.cpu.num} * 2), but that expression doesn't seem to work.

              Comment

              • mma
                Member
                • Apr 2010
                • 39

                #8
                Hello,

                Can you convert {$SYSTEM.FUZZYTIME.MAX} from 60 to 1m and change name: 'System time is out of sync (diff with Zabbix server > {$SYSTEM.FUZZYTIME.MAX}s)' please ?

                Comment

                • aguirreif
                  Junior Member
                  • Jan 2018
                  • 6

                  #9
                  Hello, why this template has the item system.localtime if according to documentation "Must be used as a passive check only"?. And the item id disabled by default but it's trigger is enabled.

                  Comment

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

                    #10
                    Why don't you do it yourself for your own purpose? Whats the diff, 60s or 1m ?...

                    Comment

                    • ActiveAgent
                      Member
                      • Oct 2021
                      • 41

                      #11
                      I installed agent 2 on an Ubuntu 21.10 out of the repo (https://repo.zabbix.com/zabbix/6.0/u...u20.04_all.deb). Edited the config as suggested (edited "ServerActive" with IP and Port for active checks, but I don´t get a connection:
                      Click image for larger version

Name:	firefox_mviXvTvO8I.png
Views:	4286
Size:	11.6 KB
ID:	443074

                      I reloaded the config-cache and restarted the proxy.

                      When I test the connection from the server/proxy side (both run on the same Ubuntu machine) with "zabbix_get" it's working:
                      Click image for larger version

Name:	bsJjA0PZji.png
Views:	4254
Size:	3.0 KB
ID:	443075

                      I don't have a firewall on the target machine running yet.

                      When I switch the Template to "Linux by Zabbix agent" it's getting a connection right away.

                      What did I miss?

                      Comment

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

                        #12
                        What do you mean with "connection"? You mean that availability icon does not turn green? It is normal, because it lights up only in case of passive checks. Only in case, when server/proxy itself is polling the host, it knows that agent is alive. If it is all active items, then server/proxy does not do polling and you will not get green icon. It is enough to turn just one item in that template to passive and you should get your green light.

                        I think this is one of most asked questions on the forum.. "Why that icon does not turn green?"..

                        Comment

                        • ActiveAgent
                          Member
                          • Oct 2021
                          • 41

                          #13
                          Right cyber, exactly. I didn't know that you'll need at least one passive check in order to turn the icon green. Since I thought it's not connected, I didn't double-check the Latest Data Fields.

                          Thanks a lot!

                          Comment

                          • epizarro
                            Junior Member
                            • Sep 2020
                            • 8

                            #14
                            Interface Speed doesn't work for any vfio virtual interface, this because vfio nics doesn't have speed limit. Like any proxmox vm. Set a preproc with range limit and set value 0 to fail

                            Click image for larger version  Name:	image.png Views:	3 Size:	4.5 KB ID:	467281h

                            also, network discovery should ​pint to system regular expression:
                            Click image for larger version

Name:	image.png
Views:	2869
Size:	9.1 KB
ID:	467284
                            Last edited by epizarro; 17-07-2023, 01:20.

                            Comment

                            • cheneric
                              Junior Member
                              • Aug 2023
                              • 11

                              #15
                              The template and details of the template in GIT repository are less "_agent" change to
                              Passive Agent - https://git.zabbix.com/projects/ZBX/...lates/os/linux
                              Active Agent - https://git.zabbix.com/projects/ZBX/...s/linux_active

                              Comment

                              Working...