Ad Widget

Collapse

Configuring systemd and smartctl monitoring with HBA/IT mode disks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • danboid
    Junior Member
    • Apr 2023
    • 16

    #1

    Configuring systemd and smartctl monitoring with HBA/IT mode disks

    I have a Ubuntu server for which I would like Zabbix to alert me when any one of (or a combination of) a few specific services either fail or if a service gets stopped. I installed zabbix-agent2 on my server that I want to monitor and I added the Systemd by Zabbix agent 2 template to it.

    The default state of this template isn't much use to me as it seems to alert on just about everything so I've had to disable until I work out how to configure it so as to be useful and not spammy. Here's what I tried but didn't work how I hoped:

    Under the Zabbix server web UI I went to Configuration -> Templates -> Systemd by Zabbix agent 2 -> Macros and change {$SYSTEMD.NAME.SERVICE.MATCHES} from

    .*


    to


    apache2\.service|mysql\.service|php8.1-fpm\.service|ssh\.service​

    That was my guess at how I might configure it but seems that isn't how its done.

    Doing something like this seems like something many users might want to do so I'd like to see this covered on:



    I've also got a problem with the official smartctl template. One of the machines that I'm using it with has several disks that are attached to a Dell HW RAID controller that is configured to run in HBA/IT mode because its using ZFS and I'm getting the error:

    "Some command to the disk failed"

    For every HBA (SATA 3 SSD) disk.

    Does the smartctl template not work with SATA disks connected to a RAID controller in HBA/IT mode? I'm pretty sure smartctl works with those disks OK via the command line.

    I am running Zabbix server 6.0 under Ubuntu 22.04

    Thanks
  • danboid
    Junior Member
    • Apr 2023
    • 16

    #2
    As for my smartctl question, it seems this is a known bug / limitation of Zabbix, the smartctl template doesn't seem to support disks attached to a RAID controller running in HBA/IT mode yet:



    There is a Zabbix ZFS template and it works well but it doesn't monitor the wear level / percentage used of your SSDs, smartctl is required for that so its unfortunate this doesn't work yet.

    Please prioritise this bug as disks are important to monitor.

    On a related note, I think the Zabbix smartctl percentage used macro should alert much sooner than it does. It defaults to alerting at 90% used but I've changed it to alert when it gets to 8% (greater than 7). I've found a lot of SSDs can kill a ZFS pools performance completely by the time they get to about 9% used.
    Last edited by danboid; 16-11-2023, 11:35.

    Comment

    • danboid
      Junior Member
      • Apr 2023
      • 16

      #3
      Today I tried both zbx-smartctl

      https://github.com/v-zhuravlev/zbx-smartctl

      and this:

      https://github.com/vargaloid/zabbix_...sung.ssd.smart

      with Zabbix 6.0 but neither gave me working monitoring of the wear leveling percentages of our Samsung SATA SSDs connected to a HBA mode RAID controller.

      Comment

      • danboid
        Junior Member
        • Apr 2023
        • 16

        #4
        Can noboby help me configure the systemd monitoring template or point me towards one that has better defaults than the official Zabbix systemd template, that is know to work with Zabbix 6.0?

        I only want to be alerted when specific services are stopped or fail.

        I cannot be the only person on this forum who needs to monitor systemd services.
        Last edited by danboid; 21-11-2023, 14:49.

        Comment

        Working...