Hey, guys:
I’m trying to restart a service (say crond) after it was crashed through remediation handler. But I keeping get the following log in sensu-client.log
{
“timestamp”:“2015-05-19T14:37:08.536736+0800”,
“level”:“info”,
“message”:“publishing check result”,
“payload”:{
“client”:“virtual-client”,
“check”:{
“name”:“heavy_remediation”,
“command”:“service crond start”,
“issued”:1432017417,
“executed”:1432017428,
“duration”:0.015,
“output”:“User has insufficient privilege.\n”,
“status”:4
}
}
}
And if I add **sudo** to the command, the sensu-client complains with the following log:
"output": “sudo: sorry, you must have a tty to run sudo\n”, “status”: 1
How can I make sure that sensu user have sufficient privilege??? Thanks!!!