1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-14 14:33:46 +01:00
nagios-plugins/check_xroad_token/check_xroad_token.sh

15 lines
405 B
Bash
Raw Normal View History

2020-09-11 18:01:05 +02:00
#!/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