Ad Widget

Collapse

Zabbix ZFS discovery monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • koochy
    Junior Member
    • Nov 2015
    • 1

    #16
    Hi,

    thx for the great template. I've some problems using it. The discovery key Zfs Dataset discovery does not work for me. I'll get a error saying:

    Global regular expression "ZFS fileset" does not exist.

    I'll guess I've to set a Global regular expressions, but I did not find it. Can you please post?

    regards

    Comment

    • Myke
      Junior Member
      • Feb 2005
      • 8

      #17
      Don't need gsed, and save on a few PIDs too

      Can replace that triple (g)sed with some awk:

      /sbin/zfs list -H -o name | awk 'BEGIN {print "{ \"data\":["} {print ((NR==1)?"":",") "{\"{#FILESETNAME}\":\""$1"\"}"} END {print "]}"}'

      /sbin/zpool list -H -o name | awk 'BEGIN {print "{ \"data\":["} {print ((NR==1)?"":",") "{\"{#POOLNAME}\":\""$1"\"}"} END {print "]}"}'

      Comment

      • Slash
        Member
        • May 2011
        • 64

        #18
        Originally posted by koochy
        Hi,

        thx for the great template. I've some problems using it. The discovery key Zfs Dataset discovery does not work for me. I'll get a error saying:

        Global regular expression "ZFS fileset" does not exist.

        I'll guess I've to set a Global regular expressions, but I did not find it. Can you please post?

        regards
        Sorry, I did miss that comment, the ZFS fileset regex is simply "/" (without the double quotes) with "character string included". Added this on share.zabbix.com .
        Last edited by Slash; 21-12-2015, 04:56.

        Comment

        • Admiral
          Junior Member
          • May 2015
          • 4

          #19
          Originally posted by pbergdolt
          Hello All,

          I have developped discovery rules for zfs storage monitoring, and I'd like to share this with you.
          This has been validated on Centos but may be easily adapted for Oracle servers (where the zfs is native).

          Below are the steps needed to install the zfs discovery rules:

          1) add the userparameter_zfs.conf file into /usr/local/etc/zabbix_agentd.conf.d directory on the host you want to monitor zfs

          2) allow the zabbix user to run "zpool" and "zfs" commands
          this is done by copying the "zabbix_sudo" file under /etc/sudoers.d directory

          3) import the zbx_export_template.xml into zabbix

          4) in zabbix gui add the "Template App ZFS" to the host you want to monitor zfs
          this will create a refer and used item for each zfs fileset
          also a zpool healt item, zpool available item. Graph will be also created


          Feel free to comment and improve.
          Regards
          On which host do you execute step 2?
          The zabbix server or the ZFS box?

          Comment

          • vroland
            Junior Member
            • Jun 2016
            • 3

            #20
            Value should be a JSON object.

            I want to monitor sol11 zfs filesystems,copied the files to my sol boxes and applied the template to them and it says "Value should be a JSON object." my zabbix 3.0.3 and the clients run sol11. any ideas?

            Comment

            • Slash
              Member
              • May 2011
              • 64

              #21
              Originally posted by vroland
              I want to monitor sol11 zfs filesystems,copied the files to my sol boxes and applied the template to them and it says "Value should be a JSON object." my zabbix 3.0.3 and the clients run sol11. any ideas?
              You need gsed for the LLD to work correctly on Unix.You may also test the solution from the first comment by Myke on share.zabbix.com by changing the "UserParameter=zfs.pool.discovery" and the "UserParameter=zfs.fileset.discovery" lines in the zfs.conf file:

              Originally posted by Myke

              Can replace that triple (g)sed with some awk:

              /sbin/zfs list -H -o name | awk 'BEGIN {print "{ \"data\":["} {print ((NR==1)?"":",") "{\"{#FILESETNAME}\":\""$1"\"}"} END {print "]}"}'

              /sbin/zpool list -H -o name | awk 'BEGIN {print "{ \"data\":["} {print ((NR==1)?"":",") "{\"{#POOLNAME}\":\""$1"\"}"} END {print "]}"}'
              If it still doesn't work, just try manually the command from zfs.pool.discovery and zfs.fileset.discovery to see where is the issue.

              Comment

              • vroland
                Junior Member
                • Jun 2016
                • 3

                #22
                Originally posted by Slash
                You need gsed for the LLD to work correctly on Unix.You may also test the solution from the first comment by Myke on share.zabbix.com by changing the "UserParameter=zfs.pool.discovery" and the "UserParameter=zfs.fileset.discovery" lines in the zfs.conf file:



                If it still doesn't work, just try manually the command from zfs.pool.discovery and zfs.fileset.discovery to see where is the issue.
                Thanks, I'll try it and let you know about the results.

                Roland

                Comment

                • robfantini
                  Junior Member
                  • Feb 2016
                  • 6

                  #23
                  how to add missing regular expression?

                  Hello

                  per: https://share.zabbix.com/operating-s...x/zfs-on-linux

                  "There is a missing regular expression named "ZFS Fileset" that you must create, the name is "ZFS Fileset" and the rule is:

                  Expression : /

                  Expression type : character string included"


                  Question: where do I put the missing regular expression?
                  Last edited by robfantini; 20-11-2016, 01:19.

                  Comment

                  • robfantini
                    Junior Member
                    • Feb 2016
                    • 6

                    #24
                    I thought there was an edit needed to one of the files. instead in zabbix:

                    To create a global regular expression:

                    Go to: Administration → General
                    Select Regular expressions from the dropdown
                    Click on New regular expression

                    Comment

                    • robfantini
                      Junior Member
                      • Feb 2016
                      • 6

                      #25
                      "Unsupported item key" errors in agent log

                      Hello,
                      using Zabbix version 3.2 , the following lines show up in zabbix_agentd.log on service start .

                      Code:
                       28621:20161119:182422.468 agent #5 started [active checks #1]
                       28621:20161119:182422.468 active check "zfs.arcstats[data_size]" is not supported: Unsupported item key.
                       28621:20161119:182422.468 active check "zfs.arcstats[hits]" is not supported: Unsupported item key.
                       28621:20161119:182422.468 active check "zfs.arcstats[meta_size]" is not supported: Unsupported item key.
                       28621:20161119:182422.468 active check "zfs.arcstats[mfu_hits]" is not supported: Unsupported item key.
                       28621:20161119:182422.469 active check "zfs.arcstats[mfu_size]" is not supported: Unsupported item key.
                       28621:20161119:182422.469 active check "zfs.arcstats[misses]" is not supported: Unsupported item key.
                       28621:20161119:182422.469 active check "zfs.arcstats[mru_hits]" is not supported: Unsupported item key.
                       28621:20161119:182422.469 active check "zfs.arcstats[mru_size]" is not supported: Unsupported item key.
                       28621:20161119:182422.469 active check "zfs.arcstats[size]" is not supported: Unsupported item key.
                       28621:20161119:182422.469 active check "zfs.fileset.discovery" is not supported: Unsupported item key.
                       28621:20161119:182422.469 active check "zfs.get.param[zfs_arc_max]" is not supported: Unsupported item key.
                       28621:20161119:182422.469 active check "zfs.memory.used" is not supported: Unsupported item key.
                       28621:20161119:182422.469 active check "zfs.pool.discovery" is not supported: Unsupported item key.
                      Is there a way to fix the issue?

                      Comment

                      • vroland
                        Junior Member
                        • Jun 2016
                        • 3

                        #26
                        Originally posted by vroland
                        Thanks, I'll try it and let you know about the results.

                        Roland
                        Sorry for the late reply, you were right, there was a problem with the packages. Updated to the latest gsed and it works fine.

                        Thanks for your help!

                        Roland

                        Comment

                        • robfantini
                          Junior Member
                          • Feb 2016
                          • 6

                          #27
                          Originally posted by Admiral
                          On which host do you execute step 2?
                          The zabbix server or the ZFS box?
                          on the client , put the file to /etc/sudoers.d/

                          Comment

                          • Slash
                            Member
                            • May 2011
                            • 64

                            #28
                            Hello everyone,

                            Just a quick message to announce that I have updated my version on https://share.zabbix.com/operating-s...x/zfs-on-linux and moved the development to github.

                            Help is welcome if you want to participate

                            Comment

                            • killmasta93
                              Member
                              • Oct 2019
                              • 45

                              #29
                              HI,
                              I dont want to necro post but not sure if it only happens to me but its not alerting when the pool has a cksum error already posted a report on the github

                              root@prometheus26:~# zpool status
                              pool: rpool
                              state: ONLINE
                              status: One or more devices has experienced an unrecoverable error. An
                              attempt was made to correct the error. Applications are unaffected.
                              action: Determine if the device needs to be replaced, and clear the errors
                              using 'zpool clear' or replace the device with 'zpool replace'.
                              see: http://zfsonlinux.org/msg/ZFS-8000-9P
                              scan: none requested
                              config:

                              NAME STATE READ WRITE CKSUM
                              rpool ONLINE 0 0 0
                              mirror-0 ONLINE 0 0 0
                              sda3 ONLINE 0 0 0
                              sdb3 ONLINE 0 0 0
                              mirror-1 ONLINE 0 0 0
                              sdc ONLINE 0 0 0
                              sdd ONLINE 0 0 33



                              Comment

                              Working...