Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-9028

Consistent device naming on linux

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 6.4.11
    • Agent2 plugin (N)
    • None
    • Linux

      Hi all

      Today, Zabbix finds devices like sda, sdb, sdc etc and that is generally fine on smaller systems. On larger, however, if you have a lot, like 20 or 80 drives, those won't be given the same device name on each bootup. Your sdd and sdc can swap place because one was detected before the other. From Linux' point of view, this isn't a bug at all, since device names shouldn't be trusted anyway. If you keep on trusting device names, zabbix will show all sorts of interesting errors that aren't there, for instance a drive in a RAID where the smart counters have started ticking, and then, after a reboot, another drive has the same count, but the first has zero. So, with the old smartctl check (before zabbix_agent2), I rewrote the discovery to allow for returning a consistent path to the device, namely /dev/disk/by-id/ata-something-blabla (or scsi- or usb-), which then is a symlink to the real device. I know this works and it removes a lot of false positives. The problem is - how can I make Zabbix' LLD for blockdevices do the same? Rewrite the whole thing in scripts? It'd be very nice if there was a way to have zabbix_agent2 do this on its own. My versjon of the LLD script for disks is here in case someone wants to have a peek https://github.com/rkarlsba/ymse/blob/master/zabbix/zbx-smartctl/discovery-scripts/nix/smartctl-disks-discovery.pl

      roy 

            esneiders Eriks Sneiders
            RoyK Roy Sigurd Karlsbakk
            Team INT
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: