Ad Widget

Collapse

Remove elements from Linux by Zabbix agent active

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • z0nk
    Member
    • Oct 2024
    • 45

    #1

    Remove elements from Linux by Zabbix agent active

    How can I remove some elements from Linux by Zabbix agent active? Like I don't want have passwd monitoring etc.
  • Answer selected by z0nk at 01-11-2024, 22:12.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    v7? Data Collection -> Templates -> find your template (write "linux" to name field of filter"). Click on "Items" column of said template.

    find your item...

    Do whatever you need with it... delete, disable ... clone and set different filename there to check some other file...​

    Comment

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

      #2
      a) delete the item (trigger will go autaomatically) from template
      b) just disable item in template

      Out of the box template are good for start, btu I would make a clone of them, throw out what I don't need, adjust others according to my needs, add those not there by default...

      Comment

      • z0nk
        Member
        • Oct 2024
        • 45

        #3
        But know disable it in template? Should I edit template code (where)?

        Can I customize shomehow? Like I don't want hash of etc/passwd but of other files, how can I do it?

        Comment

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

          #4
          v7? Data Collection -> Templates -> find your template (write "linux" to name field of filter"). Click on "Items" column of said template.

          find your item...

          Do whatever you need with it... delete, disable ... clone and set different filename there to check some other file...​

          Comment

          • z0nk
            Member
            • Oct 2024
            • 45

            #5
            Great, thanks. Yes v7

            Do I need reload it after edit or something when I use active agent?

            Can I change notification settings for each server? Like Linux agent warning about 80%+ space used, and on selected server I would like to notify only above 90% etc
            Last edited by z0nk; 01-11-2024, 22:36.

            Comment

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

              #6
              config cache is reloaded automatically ( depending on configured time, you may want to run it manually) but in general it is not needed.
              Tresholds for triggers are usually defined in macros. You can override those macros on host level, allowing you to set individual thresholds per host.. Maintaining it later may become a headache, but in small env kind of OK.

              Comment

              • Brambo
                Senior Member
                • Jul 2023
                • 245

                #7
                Originally posted by cyber
                a) delete the item (trigger will go autaomatically) from template
                b) just disable item in template

                Out of the box template are good for start, but I would make a clone of them, throw out what I don't need, adjust others according to my needs, add those not there by default...
                And what is a good way to clone a template?
                Only way I found is by a script I created myself to changes all the UUID's because export and import tries to overwrite the existing template.

                Comment

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

                  #8
                  How hard can it be? Open tempate and press "clone" button?
                  Click image for larger version

Name:	image.png
Views:	174
Size:	47.7 KB
ID:	493810

                  Comment

                  • z0nk
                    Member
                    • Oct 2024
                    • 45

                    #9
                    Originally posted by cyber
                    config cache is reloaded automatically ( depending on configured time, you may want to run it manually) but in general it is not needed.
                    Tresholds for triggers are usually defined in macros. You can override those macros on host level, allowing you to set individual thresholds per host.. Maintaining it later may become a headache, but in small env kind of OK.
                    Where excacly can I edit settings like var $VFS.FS.PUSED.MAX.WARN for selected host? I try find it in Triggers but without success...

                    Where can I configure this cache/refresh time etc? in case of "active" agents, which connect to central server.

                    PS. Thank you guys (especially cyber and ISiroshtan), after your help my Zabbix installation become useable . However, without help, the documentation itself does not explain these details, and getting to this point is terribly complicated, even impossible for a Zabbix newbie. Thank you very much for answering even stupid questions (which result from the fact that, for example, in my case, English is not native and I am sometimes not entirely sure ). I was really pissed off at first, and the main problems were due to the architecture, which assumes a passive agent by default, and changing it to active requires experience - it's not an option to be selected somewhere directly in the menu, etc. When Zabbix >works< it's great .
                    Last edited by z0nk; 08-11-2024, 18:34.

                    Comment

                    • ISiroshtan
                      Senior Member
                      • Nov 2019
                      • 324

                      #10

                      Where excactly can I edit settings like var $VFS.FS.PUSED.MAX.WARN for selected host?
                      The {$VFS.FS.PUSED.MAX.WARN} is a macro. You can read about them in detail here and here
                      In essence, to change macro for specific host you'd need to go "Data Collection - Hosts - Click on desired host - Macros tab - Add - Paste the '{$VFS.FS.PUSED.MAX.WARN}' in the name field and new value for it into value field - Update".
                      If you want to change value for all hosts - do essentially same but with template. On macro tab of template you will not need to add new one, you will need to find existing macro and change it value.
                      If you want to change it for specific filesystem(s) - that is also possible, you can check details about what feature could allow to accomplish it here.

                      Where can I configure this cache/refresh time etc?
                      Caches configured in configuration files of entity that you want to update. For server it will be zabbix_server.conf, for proxy zabbix_proxy.conf and for agent zabbix_agentd.conf.
                      As you want specifically Zabbix agent - here is params available. Tho I'm not exactly sure which caches or timers you mean on agent or why you need to change them. I'd say those values are pretty fine for most use cases and unless you have specific issue you trying to solve I would not touch them.

                      the documentation itself does not explain these details
                      I would argue this point with pretty much anyone :P
                      (except maybe some specific cases for big setups of hundreds or thousands hosts. But I would say it's not expected for person with no Zabbix knowledge to handle such case setups)

                      Documentation explains pretty much all of what I saw you asking, one just needs to know what and where to look.
                      In your case the problem is that feature set of Zabbix is pretty extensive. So when capable people create templates, they tend to utilize lot of those features. So when a fresh Zabbix admin tries to tailor those templates to their own needs - the problems will start to pop up, as you are not familiar with said feature set. With how they work, where to read about them or that those features even exist.

                      I myself had at least a few cases where I was already working with Zabbix for some years and still encountered "weird" behaviour that I could not understand. Just to later find few paragraphs in documentation explaining it. It's just till I hit said exact situation I never paid much attention to them

                      Comment

                      • troffasky
                        Senior Member
                        • Jul 2008
                        • 565

                        #11
                        Originally posted by z0nk
                        Where can I configure this cache/refresh time etc? in case of "active" agents, which connect to central server.
                        RefreshActiveChecks interval on agent side might be what you are asking? Not 100% what the question is. You might even be asking about the update interval on the item - this is set at item-level, usually on the template.

                        Comment

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

                          #12
                          As macro is already present in template, assigned to a host, then you can go to host -> configuration -> macros -> inherited macros -> change (and then save config). After that this changed value is saved as host level macro, which overrides the value from template.

                          Comment

                          Working...