unable to remove clients with certain characters and spaces in names

Ian,

​If I am not mistaken Sensu stores information like this in Redis. You might be able to get rid of the clients by deleting them from Redis.

···


Sent from Mailbox for iPhone

On Fri, May 24, 2013 at 11:14 PM, Ian Cartwright cartwright.ian@gmail.com wrote:

Hi,

Thanks for a great tool! During testing I managed to create some clients with spaces and $'s in the names - a script run as part of cloudinit was not substituting variables properly.

That is now fixed but I have been left with some clients I cannot delete, I have tried via the API and the web UI. I’ve also tried escaping the characters in the URLs when doing the API calls but this did not work.

Is there an alternative way to remove the clients - and perhaps sensu should reject names with certain characters in the future?

Thanks,

Ian

Yup, state for clients (and check history) is persisted in redis. You might be able to just delete the client key but probably want to delete the check history, if any, for the client too.

example of keys related to client named ‘dns1’:

redis 127.0.0.1:6379> keys dns1

  1. “execution:dns1:disk_iops_metrics”

  2. “execution:dns1:dns_port”

  3. “execution:dns1:check_ssl_cert_validity”

  4. “history:dns1:check_backed_up_tomcat_subprocs”

  5. “history:dns1:keepalive”

  6. “history:dns1”

  7. “execution:dns1:check_backed_up_tomcat_subprocs”

  1. “client:dns1”

···

On Fri, May 24, 2013 at 10:47 AM, Diptanu Choudhury diptanuc@gmail.com wrote:

Ian,

If I am not mistaken Sensu stores information like this in Redis. You might be able to get rid of the clients by deleting them from Redis.


Sent from Mailbox for iPhone

On Fri, May 24, 2013 at 11:14 PM, Ian Cartwright cartwright.ian@gmail.com wrote:

Hi,

Thanks for a great tool! During testing I managed to create some clients with spaces and $'s in the names - a script run as part of cloudinit was not substituting variables properly.

That is now fixed but I have been left with some clients I cannot delete, I have tried via the API and the web UI. I’ve also tried escaping the characters in the URLs when doing the API calls but this did not work.

Is there an alternative way to remove the clients - and perhaps sensu should reject names with certain characters in the future?

Thanks,

Ian

A complete Redis flush may be necessary at present. Folks are actively working on fixing the root cause.

···

On Monday, June 3, 2013 7:37:31 AM UTC-7, Richard Filippi wrote:

a “friend of mine” tried the approach of identifying the keys as suggested below and deleting them… The friend then had to throw away the existing redis database file and start again :slight_smile: just as a word of warning.

I think we’d appreciate a more documented solution, or a fix to the api to allow deletion of these keys if we correctly url encode the request

On Saturday, May 25, 2013 1:05:53 AM UTC+1, Joe Miller wrote:

Yup, state for clients (and check history) is persisted in redis. You might be able to just delete the client key but probably want to delete the check history, if any, for the client too.

example of keys related to client named ‘dns1’:

redis 127.0.0.1:6379> keys dns1

  1. “execution:dns1:disk_iops_metrics”
  1. “execution:dns1:dns_port”
  1. “execution:dns1:check_ssl_cert_validity”
  1. “history:dns1:check_backed_up_tomcat_subprocs”
  1. “history:dns1:keepalive”
  1. “history:dns1”
  1. “execution:dns1:check_backed_up_tomcat_subprocs”

  1. “client:dns1”

On Fri, May 24, 2013 at 10:47 AM, Diptanu Choudhury dipt...@gmail.com wrote:

Ian,

If I am not mistaken Sensu stores information like this in Redis. You might be able to get rid of the clients by deleting them from Redis.


Sent from Mailbox for iPhone

On Fri, May 24, 2013 at 11:14 PM, Ian Cartwright cartwri...@gmail.com wrote:

Hi,

Thanks for a great tool! During testing I managed to create some clients with spaces and $'s in the names - a script run as part of cloudinit was not substituting variables properly.

That is now fixed but I have been left with some clients I cannot delete, I have tried via the API and the web UI. I’ve also tried escaping the characters in the URLs when doing the API calls but this did not work.

Is there an alternative way to remove the clients - and perhaps sensu should reject names with certain characters in the future?

Thanks,

Ian