Ad Widget

Collapse

Check Mount exist

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tasbirnitole
    Junior Member
    • Sep 2015
    • 12

    #1

    Check Mount exist

    Dear

    I need to check some mount points are working or not in some linux servers.

    I tried with following in zabbix agentd.conf

    Code:
    UserParameter = mount.check,/home/zabbix/mount.check.sh
    that runs a script having following command

    Code:
    test -d /mnt/test && echo 0
    to check if the mount exist or not and return o if available.
    While checking it from the zabbix server with command as follows:
    Code:
    zabbix_get -s 192.168.201.18 10050 -k "mount.check"
    it shows:
    Code:
    ZBX_NOTSUPPORTED
    Please help, I actually need to create an item with trigger whenever the mount is not working.

    Thanks in advance.
  • Luiz Antonio Oliveira
    Member
    • Feb 2007
    • 49

    #2
    Tried the user zabbix?
    Did zabbix_agentd restart?

    Comment

    • tasbirnitole
      Junior Member
      • Sep 2015
      • 12

      #3
      Originally posted by Luiz Antonio Oliveira
      Tried the user zabbix?
      Did zabbix_agentd restart?
      Yes the user zabbix exist and the zabbix_agentd restart, actually there are some more UserParameters exist and working fine.

      Comment

      • Luiz Antonio Oliveira
        Member
        • Feb 2007
        • 49

        #4
        zabbix_get -s 192.168.201.18 -p 10050 -k "mount.check"

        Comment

        • tasbirnitole
          Junior Member
          • Sep 2015
          • 12

          #5
          Originally posted by Luiz Antonio Oliveira
          zabbix_get -s 192.168.201.18 -p 10050 -k "mount.check"
          [root@localhost ~]# zabbix_get -s 192.168.201.18 -p 10050 -k "mount.check"
          ZBX_NOTSUPPORTED


          Same here...

          Comment

          • jan.garaj
            Senior Member
            Zabbix Certified Specialist
            • Jan 2010
            • 506

            #6
            Change DebugLevel in you zabbix agent config file + restart agent and then check agent logs. You should see there more details (probably path/permissions problem).

            BTW: If your mount points are managed by systemd, then https://github.com/cavaliercoder/zabbix-module-systemd will be better solution:
            Code:
            zabbix_get -s 127.0.0.1 -k systemd.unit[home.mount,Unit,SubState]
            mounted
            Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
            My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

            Comment

            • Luiz Antonio Oliveira
              Member
              • Feb 2007
              • 49

              #7
              Try without double quotes

              Comment

              Working...