Hi,
I am having some trouble when trying to use command tokens in one of my checks.
my client definition looks like:
{
“client”: {
“name”: “test-sysadmin”,
“address”: "1.1.1.1,
“subscriptions”: [
“test”,
“redis”
]
},
“redis”:{
“host”: “1.1.1.1”,
“port”: “6379”
}
}
and my check is :
“check-redis-mem”: {
“command”: “/etc/sensu/plugins/check-redis-mem.rb -h :::redis.host::: -p :::redis.port::: -w 2048 -c 4096”,
“handlers”: [
“default”
],
“subscribers”: [
“redis”
],
“interval”: 10,
“notification”: “Redis RAM Consumption alert”,
“occurrences”: 2,
“refresh”: 7200
}
what i am getting in the error log is:
/etc/sensu/plugins/check-redis-mem.rb -h (:::redis.host:: -p :::redis.port::: -w 2048 -c 4096"}}
{“timestamp”:“2015-07-16T12:11:49.516735+0200”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“test-sysadmin”,“check”:{“name”:"check-redis
-mem",“issued”:1437041509,“command”:"/etc/sensu/plugins/check-redis-mem.rb -h :::redis.host::: -p :::redis.port::: -w 2048 -c 4096",“handlers”:[“default”],"subs
cribers":[“redis”],“interval”:10,“notification”:“Redis RAM Consumption alert”,“occurrences”:2,“refresh”:7200,“output”:"Unmatched command tokens: redis.host, redis
.port",“status”:3,“handle”:false}}}
Any clues?
THanks,
Hi Oriol,
You need to move the redis attribute within the client object, such as:
{
“client”: {
“name”: “test-sysadmin”,
“address”: "1.1.1.1,
“subscriptions”: [
“test”,
“redis”
],
“redis”:{
“host”: “1.1.1.1”,
“port”: “6379”
}
}
}
···
On Thursday, July 16, 2015 at 6:13:10 AM UTC-4, Oriol Arandes wrote:
Hi,
I am having some trouble when trying to use command tokens in one of my checks.
my client definition looks like:
{
“client”: {
“name”: “test-sysadmin”,
“address”: "1.1.1.1,
“subscriptions”: [
“test”,
“redis”
]
},
“redis”:{
“host”: “1.1.1.1”,
“port”: “6379”
}
}
and my check is :
“check-redis-mem”: {
“command”: “/etc/sensu/plugins/check-redis-mem.rb -h :::redis.host::: -p :::redis.port::: -w 2048 -c 4096”,
“handlers”: [
“default”
],
“subscribers”: [
“redis”
],
“interval”: 10,
“notification”: “Redis RAM Consumption alert”,
“occurrences”: 2,
“refresh”: 7200
}
what i am getting in the error log is:
/etc/sensu/plugins/check-redis-mem.rb -h (:::redis.host:: -p :::redis.port::: -w 2048 -c 4096"}}
{“timestamp”:“2015-07-16T12:11:49.516735+0200”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“test-sysadmin”,“check”:{“name”:"check-redis
-mem",“issued”:1437041509,“command”:“/etc/sensu/plugins/check-redis-mem.rb -h :::redis.host::: -p :::redis.port::: -w 2048 -c 4096”,“handlers”:[“default”],"subs
cribers":[“redis”],“interval”:10,“notification”:“Redis RAM Consumption alert”,“occurrences”:2,“refresh”:7200,“output”:"Unmatched command tokens: redis.host, redis
.port",“status”:3,“handle”:false}}}
Any clues?
THanks,
Hi Simon,
Thanks for the reply, it works.
···
El jueves, 16 de julio de 2015, 13:30:10 (UTC+2), Simon Plourde escribió:
Hi Oriol,
You need to move the redis attribute within the client object, such as:
{
“client”: {
“name”: “test-sysadmin”,
“address”: "1.1.1.1,
“subscriptions”: [
“test”,
“redis”
],
“redis”:{
“host”: “1.1.1.1”,
“port”: “6379”
}
}
}
On Thursday, July 16, 2015 at 6:13:10 AM UTC-4, Oriol Arandes wrote:
Hi,
I am having some trouble when trying to use command tokens in one of my checks.
my client definition looks like:
{
“client”: {
“name”: “test-sysadmin”,
“address”: "1.1.1.1,
“subscriptions”: [
“test”,
“redis”
]
},
“redis”:{
“host”: “1.1.1.1”,
“port”: “6379”
}
}
and my check is :
“check-redis-mem”: {
“command”: “/etc/sensu/plugins/check-redis-mem.rb -h :::redis.host::: -p :::redis.port::: -w 2048 -c 4096”,
“handlers”: [
“default”
],
“subscribers”: [
“redis”
],
“interval”: 10,
“notification”: “Redis RAM Consumption alert”,
“occurrences”: 2,
“refresh”: 7200
}
what i am getting in the error log is:
/etc/sensu/plugins/check-redis-mem.rb -h (:::redis.host:: -p :::redis.port::: -w 2048 -c 4096"}}
{“timestamp”:“2015-07-16T12:11:49.516735+0200”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“test-sysadmin”,“check”:{“name”:"check-redis
-mem",“issued”:1437041509,“command”:“/etc/sensu/plugins/check-redis-mem.rb -h :::redis.host::: -p :::redis.port::: -w 2048 -c 4096”,“handlers”:[“default”],"subs
cribers":[“redis”],“interval”:10,“notification”:“Redis RAM Consumption alert”,“occurrences”:2,“refresh”:7200,“output”:"Unmatched command tokens: redis.host, redis
.port",“status”:3,“handle”:false}}}
Any clues?
THanks,