Skip to main content Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

Nagios plugin to check Safenet HSM

Published: 03-05-2013 | Author: Remy van Elst | Text only version of this article

Table of Contents

This is a Nagios plugin to monitor a Safenet Protectserver HSM using the Safenettools. It can also gather information about the device, like firmware andfunctional module information.

If you like this article, consider sponsoring me by trying out a Digital OceanVPS. With this link you'll get $100 credit for 60 days). (referral link)


usage: ./ optionsThis script checks various safenet HSM things and outputs nagios style results.OPTIONS:   -h      Show this message   -t      Check type: "battery", "RAM", "datetime", "eventlog", "initialized", "hsminfo", "fminfo"   -n      HSM name for $ET_HSM_NETCLIENT_SERVERLIST.   -b      ctcheck binary (default: /opt/PTK/bin/ctcheck)CHECKS:   battery          Show HSM Battery status, GOOD (ok) or LOW (crit)   ram              HSM RAM, (ok) if <75% used, (warn) >75% <85% used, (crit) if >85% used.   datetime         Local HSM date/time, (crit) if different from host time, host should use ntp in same timezone.   eventlog         (ok) if eventlog not full, (crit) if eventlog full.   initialized      (ok) if initialized, (crit) if not. Documentation states that a FALSE could mean a tampered device.   hsminfo          always (ok), returns general HSM info, model, version, firmware and such.   fminfo           always (ok), returns Functional Module information.


user@host ~$ ./ -n hsm-038 -t ramOK: RAM Usage OK: 41% used, ( 10192256 total). HSM: hsm-038.user@host ~$ ./ -n hsm-038 -t datetimeOK: HSM: hsm-038 time is the same as local time: 15/04/2013 12:48.user@host ~$ ./ -n hsm-038 -t eventlogOK: HSM: hsm-038 Event Log Count: 11user@host ~$ ./ -n hsm-038 -t initializedOK: HSM: hsm-038 is initialized. All is well.user@host ~$ ./ -n hsm-038 -t hsminfoOK: HSM: hsm-038; Serial Number:[...]; Model: [...]; Device Revision: F; Firmware Revision: [...]; Manufacturing Date: [...]; Device Batch: [...]; PTKC Revision: [...]; Slot Count: [...] Security Mode: [...]; Transport Mode:[...]; Event Log Count: 88.user@host ~$ ./ -n hsm-038 -t batteryOK: Battery status is good for HSM: hsm-038


Either via Github or from this website

Tags: hsm, monitoring, nagios, safenet, software