Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check_smartmon for checking S.M.A.R.T. status. #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yevtushenko
Copy link

@yevtushenko yevtushenko commented May 7, 2016

This naigos check allows to check the S.M.A.R.T. status of disks
attached directly or disks attached to the RAID controllers. The
supported controllers are cciss (hpsa) and megaraid compatible
controllers.

To define which disks are attached to the controller the RAID utility is
required (megacli or hpacucli/hpssacli), in other case any checks won't
be added.

The lib/facter/nagios_smartmon.rb adds the facts which contain hashes
with information about controller and disks. Examples:

Two SATA disks without RAID controller

{
 0=>{"dev"=>"sda", "controller"=>"ata"},
 1=>{"dev"=>"sdb","controller"=>"ata"}
}

Single SAS disk attached to the MegaRAID controller (ServeRAID M5110e)

{
  0=>{"dev"=>"sda", "controller"=>"megaraid", "port"=>"8","interface"=>"SAS"}
}

Six SATA disks (two arrays) attached to the MegaRAID controller (ServeRAID M5110e)

{
  5=>{"port"=>"5", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"},
  0=>{"port"=>"0", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"},
  1=>{"port"=>"1", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"},
  2=>{"port"=>"2", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"},
  3=>{"port"=>"3", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"},
  4=>{"port"=>"4", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"}
}

Four SAS disks with Smart Array P840

{
  0=>{"port"=>"0", "dev"=>"sda", "controller"=>"cciss", "interface"=>nil},
  1=>{"port"=>"1", "dev"=>"sda", "controller"=>"cciss", "interface"=>nil},
  2=>{"port"=>"2", "dev"=>"sda", "controller"=>"cciss", "interface"=>nil},
  3=>{"port"=>"3", "dev"=>"sda", "controller"=>"cciss", "interface"=>nil}
}

The information from ::nagios_smartmon fact is used for creating the
nagios services and nrpe checks. For doing this Puppet 3.x clients must
to have the following configuration option in puppet.conf:

[agent]
  stringify_facts = false

Set this option before you will use the check_smartmon.

Details: https://docs.puppet.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#handling-boolean-facts-in-older-puppet-versions

This naigos check allows to check the S.M.A.R.T. status of disks
attached directly or disks attached to the RAID controllers. The
supported controllers are cciss (hpsa) and megaraid compatible
controllers.

To define which disks are attached to the controller the RAID utility is
required (megacli or hpacucli/hpssacli), in other case any checks won't
be added.

The lib/facter/nagios_smartmon.rb adds the facts which contain hashes
with information about controller and disks. Examples:

Two SATA disks without RAID controller
{
 0=>{"dev"=>"sda", "controller"=>"ata"},
 1=>{"dev"=>"sdb","controller"=>"ata"}
}

Single SAS disk attached to the MegaRAID controller (ServeRAID M5110e)
{
  0=>{"dev"=>"sda", "controller"=>"megaraid", "port"=>"8","interface"=>"SAS"}
}

Six SATA disks (two arrays) attached to the MegaRAID controller (ServeRAID M5110e)
{
  5=>{"port"=>"5", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"},
  0=>{"port"=>"0", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"},
  1=>{"port"=>"1", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"},
  2=>{"port"=>"2", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"},
  3=>{"port"=>"3", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"},
  4=>{"port"=>"4", "interface"=>"SATA", "dev"=>"sda", "controller"=>"megaraid"}
}

Four SAS disks with Smart Array P840
{
  0=>{"port"=>"0", "dev"=>"sda", "controller"=>"cciss", "interface"=>nil},
  1=>{"port"=>"1", "dev"=>"sda", "controller"=>"cciss", "interface"=>nil},
  2=>{"port"=>"2", "dev"=>"sda", "controller"=>"cciss", "interface"=>nil},
  3=>{"port"=>"3", "dev"=>"sda", "controller"=>"cciss", "interface"=>nil}
}

The information from ::nagios_smartmon fact is used for creating the
nagios services and nrpe checks. For doing this Puppet 3.x clients must
to have the following configuration option in puppet.conf:
[agent]
  stringify_facts = false

Set this option before you will use the check_smartmon.

Details: https://docs.puppet.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#handling-boolean-facts-in-older-puppet-versions
@yevtushenko
Copy link
Author

I got check_smart script here:
https://github.com/Napsty/check_smart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant