Adding multiple checks to same file

Hi

I’m trying to make the move from Nagios. In nagios I have a file that includes check_http checks for multiple websites. I’m trying to replicate the same with sensu but it keeps failing.

This is what I have

{

“checks”: {

“Website1”: {

“command”: “check-http.rb -u http://www.example.com -q biodiversity”,

“interval”: 10,

“subscribers”: [

“test”

]

}

}

}

{

“checks”: {

“Website2”: {

“command”: “check-http.rb -u http://www.example.net -q biodiversity”,

“interval”: 10,

“subscribers”: [

“test”

]

}

}

}

What am I doing wrong?

Hi Stuart,

this is a json file, you have to put comma between two checks.

Try something like this :

{

“checks”: {

“cpu”: {

“command”: “check-cpu.rb -w 85 -c 95”,

“interval”: 10,

“subscribers”: [

“test”, “service”

]

},

“disk”: {

“command”: “check-disk-usage.rb -w 85 -c 95”,

“interval”: 10,

“subscribers”: [

“test”, “service”

]

},

“memory-percent”: {

“command”: “check-memory-percent.rb -w 85 -c 95”,

“interval”: 10,

“subscribers”: [

“test”, “service”

]

}

}

}

Charles-Edouard

···

On Tuesday, December 22, 2015 at 4:59:53 PM UTC+1, Stuart Watson wrote:

Hi

I’m trying to make the move from Nagios. In nagios I have a file that includes check_http checks for multiple websites. I’m trying to replicate the same with sensu but it keeps failing.

This is what I have

{

“checks”: {

“Website1”: {

“command”: “check-http.rb -u http://www.example.com -q biodiversity”,

“interval”: 10,

“subscribers”: [

“test”

]

}

}

}

{

“checks”: {

“Website2”: {

“command”: “check-http.rb -u http://www.example.net -q biodiversity”,

“interval”: 10,

“subscribers”: [

“test”

]

}

}

}

What am I doing wrong?