1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-13 22:13:44 +01:00
nagios-plugins/check_xroad_token/check_xroad_token.sh
2020-09-11 16:01:05 +00:00

15 lines
405 B
Bash

#!/bin/bash
xroad_list_tokens=$(signer-console list-tokens)
if [[ $xroad_list_tokens == "Token: 0 (OK, writable, available, active)" ]]
then
echo "OK - $xroad_list_tokens"
exit 0
elif [[ $xroad_list_tokens != "Token: 0 (OK, writable, available, active)" ]]
then
echo "Critical - $xroad_list_tokens"
exit 2
else
echo "Unknown - $xroad_list_tokens"
exit 3
fi