Proxy clients

Hey guys,

I have a large amount of switches that I want to monitor, beginning with a simple ping.

I originally set up conf.d/checks-sa-switches.json and in here added the proxy checks:

{
“check”: {
“name”: “ping-coresw01”,
“source”: “coresw01”,
“command”: “ping.rb -h 172.16.20.211”,
“interval”: 60,
“subscribers”: [ “switches” ]
}
}
}

However, this is defining a single check for every proxy client and begins to clutter up my checks section in Uchiwa.

I was wondering, is there any way to actually define the proxy clients as… clients?

For example, I could keep my conf.d/checks-sa-switches.json but alter it to be generic:

{
“check”: {
“name”: “ping-::name::”,
“source”: “::name::”,
“command”: “ping.rb -h ::address::”,
“interval”: 60,
“subscribers”: [ “switches” ]
}
}
}

and then conf.d/proxyclients-switches.json:

{
“client”: {
“name”: “coresw01”,
“address”: “172.16.20.211”,
“keepalive” false,
“subscriptions”: [ “switches” ]
}
}
}
(Rinse and repeate for each switch we want to check)

I realise that’s not valid json, but you get the gist.

Stop me if this is a stupid idea, but reading the documentation it looked like this could be possible, and if not - should it be?

Correction on the check name, it'd just be "ping" as not to create a tonne of separate checks again.

]AFAIK proxy clients cannot be defined in config files like that, however you can populate all the clients using the API:
https://sensuapp.org/docs/0.25/api/clients-api.html#clients-post-specification

But I don’t think proxy clients can respond to subscriptions like that?

···

On Fri, Jul 22, 2016 at 11:16 AM, James Booth vvalentine1337@gmail.com wrote:

Hey guys,

I have a large amount of switches that I want to monitor, beginning with a simple ping.

I originally set up conf.d/checks-sa-switches.json and in here added the proxy checks:

{
“check”: {
“name”: “ping-coresw01”,
“source”: “coresw01”,
“command”: “ping.rb -h 172.16.20.211”,
“interval”: 60,
“subscribers”: [ “switches” ]
}
}
}

However, this is defining a single check for every proxy client and begins to clutter up my checks section in Uchiwa.

I was wondering, is there any way to actually define the proxy clients as… clients?

For example, I could keep my conf.d/checks-sa-switches.json but alter it to be generic:

{
“check”: {
“name”: “ping-::name::”,
“source”: “::name::”,
“command”: “ping.rb -h ::address::”,
“interval”: 60,
“subscribers”: [ “switches” ]
}
}
}

and then conf.d/proxyclients-switches.json:

{
“client”: {
“name”: “coresw01”,
“address”: “172.16.20.211”,
“keepalive” false,
“subscriptions”: [ “switches” ]
}
}
}
(Rinse and repeate for each switch we want to check)

I realise that’s not valid json, but you get the gist.

Stop me if this is a stupid idea, but reading the documentation it looked like this could be possible, and if not - should it be?

Hi,

did you or someone manage to accomplish the goal? Either out of box or by hack?

I have the same problem. Even Sensu fits monitoring perfectly, I need to monitor hundreds of network devices.

One option could be to subscribe real client for the check which has defined source as name of the network device - that works, however tokens take variable values (etc. name, address) from the real client and not form proxy client. Would be good if proxy clients could somehow virtually subscribe as well. Or at least if tokens could be used for data from proxy client.

Thanks a lot for any thoughts.

Dne pátek 22. července 2016 20:16:17 UTC+2 James Booth napsal(a):

···

Hey guys,

I have a large amount of switches that I want to monitor, beginning with a simple ping.

I originally set up conf.d/checks-sa-switches.json and in here added the proxy checks:

{
“check”: {
“name”: “ping-coresw01”,
“source”: “coresw01”,
“command”: “ping.rb -h 172.16.20.211”,
“interval”: 60,
“subscribers”: [ “switches” ]
}
}
}

However, this is defining a single check for every proxy client and begins to clutter up my checks section in Uchiwa.

I was wondering, is there any way to actually define the proxy clients as… clients?

For example, I could keep my conf.d/checks-sa-switches.json but alter it to be generic:

{
“check”: {
“name”: “ping-::name::”,
“source”: “::name::”,
“command”: “ping.rb -h ::address::”,
“interval”: 60,
“subscribers”: [ “switches” ]
}
}
}

and then conf.d/proxyclients-switches.json:

{
“client”: {
“name”: “coresw01”,
“address”: “172.16.20.211”,
“keepalive” false,
“subscriptions”: [ “switches” ]
}
}
}
(Rinse and repeate for each switch we want to check)

I realise that’s not valid json, but you get the gist.

Stop me if this is a stupid idea, but reading the documentation it looked like this could be possible, and if not - should it be?

I am doing exactly same for bunch of checks for remote web services. Only drawback, I have to create multiple checks for even same kind of service.

I neater way to doing this would be appreciated.