I'am using open source tools for the first time. I would like to install sensu, All i want to know that is there any method in which i can add my newly provisioned service automatically to the sensu server.
-
This is a wide scope. You can always add new clients dynamically to sensu. This depends on you infrastructure. We have puppet which pushes new client information to sensu with the help of a python script. In addition to that sensu has a decent api which supports addition of new clients. You may write script for this or use any configuration management systems like puppet or chef. – Appu Sidhardh May 13 '16 at 06:23
-
thank you! but I want it to be done without using automation tools like puppet and chef. How can i achieve that using API ? – Vineesha.C May 13 '16 at 08:35
-
Check post section in this document [sensu api documentation](https://sensuapp.org/docs/latest/api-clients) Please note, So far I have seen its not possible to create events in sensu using their api. – Appu Sidhardh May 13 '16 at 12:27
2 Answers
@vineesha We can make this possible when using rabbit mq, please write a script to fetch hostname and Ip address and update client.json and restart rabbitmq server and sensu-client. In the golden image please hard code the IP address of sensu server in rabbitmq.json. When all this is done please set a cron with @reboot and this should be all. When the server is launched it will automatically add to the sensu server.

- 103
- 1
- 5
If you are planning to use automation tools like for example puppet, all you need to do is to ensure that the sense-client is installed and the client config includes the correct RabbitMQ config. As soon as the client connects to the same RabbitMQ host/cluster it should also pop up in you dashboard e.g. uchiwa. There is no need to explicitly give the sense-server any information directly.

- 1,490
- 8
- 19