Ad Widget

Collapse

How to monitor dynamic Linux Processes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sunghost
    Junior Member
    • Sep 2016
    • 16

    #1

    How to monitor dynamic Linux Processes

    Hi,
    i use latest Zabbix Version under Debian. Actually i create for each Userprocess an Item with "proc.cpu.util[XY]" and added it to a graph. The problem is that this is very dynamic and some process are new and runs always from the time of creating, but other existing are deleting and no longer in use, so the Item has to be deleted in zabbix.
    Is there an any dynamic possibility to get all processes with e.g. proc.cpu.util[myprocessXY] ?
    thx
    Last edited by Sunghost; 25-01-2024, 10:39.
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    There is an item proc.get that can be used in Low-Level Discovery to discover, create and monitor all running processes.

    Comment

    • Sunghost
      Junior Member
      • Sep 2016
      • 16

      #3
      Hey, i need more help. I read the manual for lld, but i dont know how to configure that. The aim is that all cpu avg for e.g. web21, web202, webXY is read, graph created and that dynamically. So if this is the state today tomorrow it could be web23, web 310, webXY. Any one who can help ? thax

      Comment

      • PavelZ
        Senior Member
        • Dec 2024
        • 162

        #4
        I suggest thinking about the option of monitoring systemd units. In modern Linux, all applications are in systemd.
        In this case, it does not matter how many and what processes the application creates. Resources will be under control

        Comment

        • Sunghost
          Junior Member
          • Sep 2016
          • 16

          #5
          Hi PavelZ and thanks for your reply. I am not sure if i understand you, because of language problems. I understand, instead of monitoring single processes just monitor all over systemd and get one value for all. Right? I actually monitor each process, as far as i get knowledge of this, by "proc.cpu.util[,web10,total,,avg1]". Thats to much manually interaction and some are not noticed.

          Comment

          • PavelZ
            Senior Member
            • Dec 2024
            • 162

            #6
            I think I was a bit hasty and confused with other monitoring systems.
            Currently Zabbix Agent 2 does not support CPU load, etc of Systemd units.

            Comment

            • Sunghost
              Junior Member
              • Sep 2016
              • 16

              #7
              Ah ok, so is there another possibility? If Zabbix could do that, i think about a script which runs every X Minutes, which returns the name e.g. web007 and the avg. cpu. But i do not know how to configure these 2 values for zabbix actually. i need the 1. value=name for x-achses and the 2. value=cpu avg value for y-achses.

              Comment

              • Markku
                Senior Member
                Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                • Sep 2018
                • 1781

                #8
                As linked above, LLD is the tool you'll use to identify the processes and create items in Zabbix for gathering the data. You can for example create a script that returns the list (in JSON as described in LLD documentation) of your interesting processes, and configure a UserParameter to run that script, to be run periodically by the discovery rule. In your rule you create the proc.cpu.util items (using item prototypes) you want.

                Markku

                Comment

                • Sunghost
                  Junior Member
                  • Sep 2016
                  • 16

                  #9
                  Hi, ok thanks. Do you know any more detailed howto, or an example for my case which are running actual in default zabbix to have a closer look? thx

                  Comment

                  • Markku
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                    • Sep 2018
                    • 1781

                    #10
                    See almost any default template, like filesystem, network interface or systemd templates, they all use LLD to discover and then monitor dynamic items.

                    Markku

                    Comment

                    Working...