I’m having a problem with getting a check to actually run.
The check in question is showing up under the Checks tab in Uchiwa, but when I click on one of the nodes that are in the subscription group that this check is in, it either doesn’t show up at all, or it shows up as having run once, and only once. To my eye (and a couple other eyes), it is set up exactly the same as the other checks, although it does have an “api_requested” field showing up, that isn’t in any part of the configuration, so I’m unsure of what to make of that. This is from Uchiwa when I click on the check in question:
api_requested
{ "creator": null , "reason": null
}
command
/etc/sensu/plugins/check-yarn.sh skynet
duration
0.012
executed
2017-05-25 09:18:28
handlers
opsgenie
issued
2017-05-25 09:17:25
name
yarn_skynet
occurrences
1
output
yarn is OK, it has 3 pendingapps
status
0
type
standard
history
0
The output shown is correct. I think it’s odd that no interval is showing up - one is defined in the checks.yml on the master:
“yarn_skynet”: {
“command”: “/etc/sensu/plugins/check-yarn.sh skynet”,
“handlers”: [
“opsgenie”
],
“interval”: 30,
“occurrences”: 1,
“subscribers”: [
“mapr_alarms”
]
},
When I grep through the client logs, I see the following:
root@sensu-client:/var/log/sensu# grep yarn_skynet sensu-client.log
{“timestamp”:“2017-05-25T09:18:28.849956+1000”,“level”:“info”,“message”:“received check request”,“check”:{“command”:"/etc/sensu/plugins/check-yarn.sh skynet",“handlers”:[“opsgenie”],“occurrences”:1,“name”:“yarn_skynet”,“api_requested”:{“reason”:null,“creator”:null},“issued”:1495667845}}
{“timestamp”:“2017-05-25T09:18:28.862034+1000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“sensu-client”,“check”:{“command”:"/etc/sensu/plugins/check-yarn.sh skynet",“handlers”:[“opsgenie”],“occurrences”:1,“name”:“yarn_skynet”,“api_requested”:{“reason”:null,“creator”:null},“issued”:1495667845,“executed”:1495667908,“duration”:0.012,“output”:“yarn is OK, it has 3 pendingapps\n”,“status”:0}}}
All other checks are reporting correctly, and no others have that “api_requested” field.
Any thoughts or suggestions?
Thank you,
Alan