![]() ![]() It should fail as we don’t have a web server running: $ /usr/lib64/nagios/plugins/check_http -I 127.0.0.1Ĭonnect to address 127.0.0.1 and port 80: Connection refused Try checking the status of a web server running on the client machine. Now let’s explore the plugin by executing it manually. $ sudo yum install -y nagios-plugins-http Remember, this plugin will be executed on the clients.Įnable EPEL and install nagios-plugins-http : $ sudo yum install -y epel-release Let’s install one check plugin on the client machine. Checks are executable files and are run by the Sensu client.Ĭheck definitions let Sensu know how, where, and when to run the plugin. Sensu is compatible with the Nagios check plugin specification, so any check for Nagios can be used without modification. Sensu checks have two components: a plugin and a definition. $ sudo systemctl start sensu-client Sensu checks The environment field can help you filter, and subscription defines which monitoring checks will be executed by the client.įinally, enable and start the services and check in Uchiwa, as the new client will register automatically: $ sudo systemctl enable sensu-client In the name field, specify a name to identify this client (typically the hostname). To configure sensu-client, create the same redis.json and transport.json created in the server machine, as well as the client.json configuration file: $ sudo tee /etc/sensu/conf.d/client.json << EOF With the repository enabled, install the package Sensu: $ sudo yum install sensu -y To add a new client, you will need to enable Sensu repository on the client machines by creating the file /etc//sensu.repo. $ sudo tee /etc/sensu/conf.d/transport.json :3000įor production environments, it’s recommended to run a cluster of RabbitMQ as the Transport instead of Redis (a Redis cluster can be used in production too), and to run more than one instance of Sensu Server and API for load balancing and high availability. Redis is now installed and ready to be used by Sensu.įirst, configure the Sensu repository and install the packages: $ sudo tee /etc//sensu.repo ", $ sudo sed -i 's/^# requirepass foobared/requirepass password123/g' /etc/nfĮnable and start Redis service: $ sudo systemctl enable redis Modify /etc/nf to disable protected mode, listen on every interface, and set a password: $ sudo sed -i 's/^protected-mode yes/protected-mode no/g' /etc/nf Then install Redis: $ sudo yum install redis -y To install Redis, enable the EPEL repository: $ sudo yum install epel-release -y One or more Linux machines to monitor (clients) One Linux installation to act as the server node (I used CentOS 7 for this article) Finally, Uchiwa is the web interface to communicate with Sensu API. ![]() ![]() Sensu uses a data store (Redis) to keep all the persistent data. Sensu Client executes checks either scheduled by Sensu Server or local checks definitions. The server publishes check definitions to the clients and the Sensu API provides a RESTful API, providing access to monitoring data and core functionality. It registers clients and processes check results and monitoring events using filters, mutators, and handlers. Sensu Server processes event data and takes action. Transport can use either RabbitMQ (recommended in production) or Redis. Every Sensu component must connect to the Transport in order to send messages to each other. Sensu's main communication mechanism is the Transport. Sensu's modular architecture means every component can be installed on the same server or on completely separate machines. eBook: Building a hybrid cloud strategy.Free online course: Developing cloud-native applications with microservices architectures. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |