set to B<false>, B<only> matching disks will be collected. If B<IgnoreSelected>
is set to B<true>, all disks are collected B<except> the ones matched.
+=item B<IgnoreSleepMode> B<true>|B<false>
+
+Normally, the C<smart> plugin will ignore disks that are reported to be asleep.
+This option disables the sleep mode check and allows the plugin to collect data
+from these disks anyway. This is useful in cases where libatasmart mistakenly
+reports disks as asleep because it has not been updated to incorporate support
+for newer idle states in the ATA spec.
+
=back
=head2 Plugin C<snmp>
static const char *config_keys[] =
{
"Disk",
- "IgnoreSelected"
+ "IgnoreSelected",
+ "IgnoreSleepMode"
};
static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);
static ignorelist_t *ignorelist = NULL;
+static int ignore_sleep_mode = 0;
static int smart_config (const char *key, const char *value)
{
invert = 0;
ignorelist_set_invert (ignorelist, invert);
}
+ else if (strcasecmp ("IgnoreSleepMode", key) == 0)
+ {
+ if (IS_TRUE (value))
+ ignore_sleep_mode = 1;
+ }
else
{
return (-1);
DEBUG ("smart plugin: disk %s has no SMART support.", dev);
goto end;
}
- if (sk_disk_check_sleep_mode (d, &awake) < 0 || !awake)
+ if (!ignore_sleep_mode)
{
- DEBUG ("smart plugin: disk %s is sleeping.", dev);
- goto end;
+ if (sk_disk_check_sleep_mode (d, &awake) < 0 || !awake)
+ {
+ DEBUG ("smart plugin: disk %s is sleeping.", dev);
+ goto end;
+ }
}
if (sk_disk_smart_read_data (d) < 0)
{