3

Is there a collectd plugin that will display the drive's make?

The reason I ask is, that I am trying to create a Grafana dashboard, and I need to set Western Digital drives with certain upper thresholds, and Segate drives with other thresholds (using templates).

Unfortunately, when I look into influxdb I'm not seeing anything that I can use to differentiate a Western Digital drive from a Segate drive; not a model number or anything else; they simply show up as sda, sdb, sdc, etc.

leeand00
  • 4,807
  • 13
  • 64
  • 106

1 Answers1

2

It is possible I am wrong, but I'm pretty sure that collectd's entire reason for existence is to fire ${string} = ${number} pairs into whatever data collector you need. What you're asking for is ${string} = ${string} pairs, which it's not designed to do. You're going to have to use a non-collectd method to grab those values and feed them into something Grafana can query.

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
  • Alright, well it's no secret I'm a little new to collectd. That sounds about right though. Maybe I could use something like the threshold value to figure it out...if that differs...if there isn't a way to differentiate it, then that pretty much renders the templating useless for creating the graphs quicker and easier. – leeand00 Jan 01 '18 at 15:34
  • Well what about defining my own values in influx and then figuring out which thresholds to use based on that? Like using $host and $drive in some other type of query, that will return 0 for WD and 1 for seagate or something like that? (of course I'd have to add a time to it to....maybe in the distant future) – leeand00 Jan 01 '18 at 15:42
  • @leeand00 As it happens, getting Grafana to add thresholds dynamically is something I'm also struggling with. Like, setting a horizontal line on the load-average chart showing the number of cores on a box. Both numbers are there in Influx, but I haven't figured out how to get Grafana to use them at the same time. – sysadmin1138 Jan 01 '18 at 16:37
  • I tried writing a query that would return the value of the threshold to a variable, but it just returns the time instead; since the time is alway returned in a select statement. – leeand00 Jan 02 '18 at 01:08