monitoring license servers - raeker/ARC-Wiki-Test GitHub Wiki
At the time of writing, we are using standalone checks on flux-admin02
to monitor our license servers (rather than installing the sensu-client
on the license servers themselves).
We basically wanted to replicate what Icinga was doing, but with
Sensu.
This means that the server executes checks from itself against the hosts
defined in its checks definition file
(/etc/sensu/conf.d/licenseServer_checks.json on flux-admin02), instead
of delivering a payload to the client running on a given license
server.
This also means that we had to utilize certain checks that Icinga was
using. This is fine because Sensu can use Nagios checks (or any checks),
but we had to make some modifications to scripts because of assumed
binary paths, for example.
For example, we needed to make sure the sensu-server role installs the
nagios-plugins-perl and redhat-lsb-core packages, so that we could
leverage the license checks perl scripts Icinga used.
We also had to make sure that we have a copy of the lmstat binary which
certain perl scripts relied on in order to effectively check the license
servers, and that the binary worked as expected.
Since we're only using flux-admin02 all of the moving parts are in its role:
- Copying of the lmstat binary
- Installation of nagios-plugins-perl, redhat-lsb-core, and gcc-c++
- Creation of the check_flexlm_vendor script in /opt/sensu/embedded/bin
- Defining of all license server checks in
/etc/sensu/conf.d/licenseServer_checks.json
- The handler used for these checks is the mailer handler which emails [email protected] for issues
You can use whatever type of script/check you want, but you are responsible for:
- Making sure its dependencies are met
- Whether plugins, modules, or system binaries called within the script
- Making sure it runs manually before putting into a check file
- Making sure you define a handler (i.e. how you're alerted) for each check