Configure Sensu and other Actions to Register Clients

Similar documents
AppDefense Plug-In. VMware AppDefense 2.0

Red Hat OpenStack Platform 8. Operational Tools. Centralized Logging and Monitoring of an OpenStack Environment. OpenStack Team

Upgrade an Application Using CloudCenter

HP IT Operations Compliance Community Edition

Installation and setup guide of 1.1 demonstrator

VMware AirWatch Content Gateway for Linux. VMware Workspace ONE UEM 1811 Unified Access Gateway

Release Zenoss, Inc.

FlashGrid Cloud Area Network Version 17.05

Spacewalk. Installation Guide for CentOS 6.4

OpenNebula 4.8 Quickstart CentOS 6 and Xen

Spacewalk. Installation Guide RHEL 5.9

Redhat OpenStack 5.0 and PLUMgrid OpenStack Networking Suite 2.0 Installation Hands-on lab guide

VMware AirWatch Content Gateway Guide For Linux

Migrate Cisco Prime Collaboration Assurance

OnCommand Unified Manager 7.2 Installation and Setup Guide

VMware AirWatch Content Gateway Guide for Linux For Linux

Downloading and installing Db2 Developer Community Edition on Red Hat Enterprise Linux Roger E. Sanders Yujing Ke Published on October 24, 2018

Image or Clone a Computer with FireAMP Connector Installed

Acronis Backup Advanced for vcloud Update 7

EnhancedEndpointTracker Documentation

Installing and Configuring vcloud Connector

Hosting Applications Using Configuration Management Tools

Azure Development Course

IBM Integration Bus v9.0 System Administration: Course Content By Yuvaraj C Panneerselvam

Metasploit. Installation Guide Release 4.4

Installation and Setup Guide

OpenNebula 4.4 Quickstart CentOS 6 and KVM. OpenNebula Project

Automated Installation Guide for CentOS (PHP 7.x)

SAS Event Stream Processing for Edge Computing 4.3: Deployment Guide

Red Hat Quay 2.9 Deploy Red Hat Quay - Basic

Troubleshoot Google Cloud Integration with CCM version 4.8.0/4.7.x

OnCommand Unified Manager 9.4 Installation and Setup Guide

About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer. Logstash

Installing SmartSense on HDP

Replace Single Server or Cluster

Oracle Enterprise Manager. 1 Before You Install. System Monitoring Plug-in for Oracle Unified Directory User's Guide Release 1.0

DEPLOYING A 3SCALE API GATEWAY ON RED HAT OPENSHIFT

Developing and Deploying vsphere Solutions, vservices, and ESX Agents. 17 APR 2018 vsphere Web Services SDK 6.7 vcenter Server 6.7 VMware ESXi 6.

How to force automatic removal of deleted files in nextcloud

OpenNebula 4.6 Quickstart CentOS 6 and ESX 5.x

Using DC/OS for Continuous Delivery

LAMP Stack - VMware Sample Blueprint

NSX-T Upgrade Guide. VMware NSX-T 2.1

Developing and Deploying vsphere Solutions, vservices, and ESX Agents

SUREedge MIGRATOR INSTALLATION GUIDE FOR VMWARE

Sentral Quick Start Guide. Revision F

About me! RajeshKumarIN

Lab 4: Configuring node.js apps with ATP

OnCommand Unified Manager 7.3 Installation and Setup Guide

OpenNebula 4.4 Quickstart CentOS 6 and ESX 5.x. OpenNebula Project

Acronis Monitoring Service

Cloud Help for Community Managers...3. Release Notes System Requirements Administering Jive for Office... 6

Copyright 2012 Trend Micro Incorporated. All rights reserved. Protected by U.S. Patent No. 7,516,130 and U.S. Patent No. 7,747,642.

Citrix CloudPlatform (powered by Apache CloudStack) Version 4.3 Release Notes. Revised April 9, :00 pm IST

MaaS Integration for Baremetal Provisioning in Cloudstack

Linux Essentials Objectives Topics:

Gateway Guide. Leostream Gateway. Advanced Capacity and Connection Management for Hybrid Clouds

Installing and Configuring vcloud Connector

Upgrading to VMware Identity Manager 3.0. SEP 2017 VMware AirWatch 9.2 VMware Identity Manager 3.0

Comodo IT and Security Manager Software Version 6.4

Azure Marketplace Getting Started Tutorial. Community Edition

Acronis Backup Version 11.5 Update 6 INSTALLATION GUIDE. For Linux Server APPLIES TO THE FOLLOWING PRODUCTS

ECP. Installation Guide V4.2.0

PRODUCT DOCUMENTATION. Pivotal RabbitMQ. Version 3.4. Getting Started with Pivotal RabbitMQ. Rev: Pivotal Software, Inc.

Red Hat OpenStack Platform 12

DC/OS on Google Compute Engine

VMware AirWatch Content Gateway Guide for Linux For Linux. AirWatch v9.3

Red Hat Development Suite 2.2

Using ANM With Virtual Data Centers

Image Management Service. User Guide. Issue 03. Date

APAR PO06620 Installation Instructions

Using the vrealize Orchestrator Chef Plug-In 1.0

HPE ComputeSensor. User Guide. Software Version: 3.02 Windows and Linux operating systems. Document Release Date: August 2017

Azure Marketplace. Getting Started Tutorial. Community Edition

Lab 03 Finish and Deploy an Application. Lab 3-1: Add DELETE to the Spring Boot REST Application

Upgrade Instructions. NetBrain Integrated Edition 7.0

Bacula Server Installation and Configuration on Centos 6.2

SUREedge MIGRATOR INSTALLATION GUIDE FOR HYPERV

Upgrading to VMware Identity Manager 2.7

SUREedge MIGRATOR INSTALLATION GUIDE FOR NUTANIX ACROPOLIS

vcenter Operations Management Pack for NSX-vSphere

IBM Endpoint Manager. OS Deployment V3.5 User's Guide

Upgrade Guide. This document details the upgrade process for customers moving from the full version of OnApp Cloud v2.3.1 to v2.3.2.

ULTEO OPEN VIRTUAL DESKTOP CENTOS 6.0 SUPPORT

VIRTUAL GPU LICENSE SERVER VERSION , , AND 5.1.0

Developing and Deploying vsphere Solutions, vservices, and ESX Agents

DataMan. version 6.5.4

8.0 Help for Community Managers Release Notes System Requirements Administering Jive for Office... 6

IBM Endpoint Manager. OS Deployment V3.8 User's Guide - DRAFT for Beta V.1.0 (do not distribute)

Carbon Black QRadar App User Guide

BPPM Patrol Agent Installation Steps on Linux and Automation Integration

Table of Contents

Guest Shell. Finding Feature Information. Information About Guest Shell. Guest Shell Overview

Purpose. Target Audience. Install SNMP On The Remote Linux Machine. Nagios XI. Monitoring Linux Using SNMP

UDS Enterprise Free & Evaluation Edition. Lab UDS Enterprise + VMware vsphere + RDP/XRDP

UDS Enterprise Free & Evaluation Edition. Lab UDS Enterprise + VMware vsphere + RDP/XRDP

OpenNebula 4.12 Quickstart CentOS 7 and KVM

Akana API Platform: Upgrade Guide

OpenNebula 4.10 Quickstart CentOS 6 and KVM

FUJITSU Software ServerView Cloud Monitoring Manager V1.1. OpenStack Operator's Guide

Transcription:

Configure Sensu and other Actions to Register Clients Contents Introduction Prerequisites Requirements Components Used Background Information Configure Install Epel Repository Install Erlang Install Redis, RabbitMQ, and Configure RabbitMQ Register Sensu Repository Install and Configure Sensu Enable Sensu Services Install and Configure Uchiwa Verify if the Server Runs Configure Checks Restart Sensu Update Action Scripts Create Sensu Actions Related Information Introduction This document describes how to configure a Sensu server and other actions on CloudCenter to add or remove worker Virtual Machines (VMs) from the server. Prerequisites Requirements Cisco recommends that you have knowledge of these topics: CloudCenter Actions Sensu Components Used This document is not restricted to specific software and hardware versions. The information in this document was created from the devices in a specific lab environment. All of

the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command. Background Information Sensu is a program designed to monitor various aspects of a machine. It can be incorporated into CloudCenter to provide increased monitoring ability to any deployed VM's. This walkthrough is designed to be an example that shows how you can integrate Sensu with CloudCenter with the use of actions. Configure This is designed to run on a CentOS 7 VM that has direct access to the internet. If you need to connect to a proxy, perform that configuration before you proceed. Open these ports for incoming and outgoing: 3000, 3030, 4567, 5671, 5672, 6379. Ensure that the Sensu server has a static IP address. Note: All that is inside the Code Blocks is designed to be copied and pasted into the terminal. Install Epel Repository sudo yum -y install epel-release Install Erlang sudo yum -y install erlang Install Redis, RabbitMQ, and Configure RabbitMQ sudo rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc sudo rpm -Uvh http://www.rabbitmq.com/releases/rabbitmq-server/v3.4.1/rabbitmq-server-3.4.1-1.noarch.rpm sudo rabbitmq-plugins enable rabbitmq_management sudo yum -y install redis sudo chkconfig redis on sudo service redis start sudo chkconfig rabbitmq-server on sudo /etc/init.d/rabbitmq-server start sudo rabbitmqctl add_vhost /sensu sudo rabbitmqctl add_user sensu secret sudo rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*" Register Sensu Repository echo '[sensu] name=sensu-main baseurl=http://repositories.sensuapp.org/yum/el/7/x86_64/ gpgcheck=0 enabled=1' sudo tee /etc/yum.repos.d/sensu.repo Install and Configure Sensu sudo yum -y install sensu

sudo rm -f /etc/sensu/config.json.example echo '{ "api": { "host": "localhost", "bind": "0.0.0.0", "port": 4567 } }' sudo tee /etc/sensu/conf.d/api.json echo '{ "client": { "name": "sensu-server", "address": "127.0.0.1", "environment": "sensu", "subscriptions": [ "linux"], "keepalive": { "handler": "mailer", "thresholds": { "warning": 250, "critical": 300 } }, "socket": { "bind": "127.0.0.1", "port": 3030 } } }' sudo tee /etc/sensu/conf.d/client.json echo '{ "rabbitmq": { "host": "127.0.0.1", "port": 5672, "vhost": "/sensu", "user": "sensu", "password": "secret" } }' sudo tee /etc/sensu/conf.d/rabbitmq.json echo '{ "redis": { "host": "127.0.0.1", "port": 6379 } }' sudo tee /etc/sensu/conf.d/redis.json echo '{ "transport": { "name": "rabbitmq", "reconnect_on_error": true } }' sudo tee /etc/sensu/conf.d/transport.json Enable Sensu Services sudo chkconfig sensu-server on sudo chkconfig sensu-client on sudo chkconfig sensu-api on sudo service sensu-server start sudo service sensu-client start sudo service sensu-api start Install and Configure Uchiwa sudo yum -y install uchiwa echo '{ "sensu": [ { "name": "sensu", "host": "localhost", "port": 4567, "timeout": 10 } ], "uchiwa": { "host": "0.0.0.0", "port": 3000, "refresh": 10 } }' sudo tee /etc/sensu/uchiwa.json sudo chown uchiwa:uchiwa /etc/sensu/uchiwa.json sudo chmod 664 /etc/sensu/uchiwa.json sudo chkconfig uchiwa on sudo service uchiwa start Verify if the Server Runs Navigate to IPAddress: 3000/#/events

At this point, you should have one client called Sensu-server. Configure Checks echo '{ "checks": {

"check-cpu-linux": { "handlers": ["mailer"], "command": "/opt/sensu/embedded/bin/check-cpu.rb -w 80 -c 90 ", "interval": 60, "occurrences": 5, "subscribers": [ "linux" ] } } }' sudo tee /etc/sensu/conf.d/check_cpu_linux.json echo '{ "checks": { "check-disk-usage-linux": { "handlers": ["mailer"], "type": "metric", "command": "/opt/sensu/embedded/bin/check-disk-usage.rb", "interval": 60, "occurrences": 5, "subscribers": [ "linux" ] } } }' sudo tee /etc/sensu/conf.d/check_disk_usage_linux.json echo '{ "checks": { "check_memory_linux": { "handlers": ["mailer"], "command": "/opt/sensu/embedded/bin/check-memory-percent.rb -w 80 -c 90 ", "interval": 60, "occurrences": 5, "refresh": 1800, "subscribers": [ "linux" ] } } }' sudo tee /etc/sensu/conf.d/check_memory_linux.json sudo sensu-install -p cpu-checks sudo sensu-install -p disk-checks sudo sensu-install -p memorychecks Restart Sensu sudo service sensu-client restart && sudo service sensu-server restart && sudo service sensu-api restart After a minute, you should have three checks listed. If you click on the Sensu-server client, you see detailed information from the three checks for that device. Update Action Scripts 1. Download Sensu.zip. 2. Unzip file. 3. Edit sensuinstall.sh. 4. Change the line host to"sensuserverip" to have the IP address of the Sensu Server.

5. Edit sensuuninstall.sh.

6. Change the line curl -s -i -X DELETE http://sensuserverip:4567/clients/$cliqrnodehostname to have the IP address of the Sensu Server. 7. Zip the modified files back into Sensu.zip. 8. Upload to a repository that the CloudCenter Manager (CCM) has configured. Create Sensu Actions Navigate to Actions Library and select New Action. Type: Command or Script Action Name: Register Sensu Description: Installs Sensu client and registers it with the server Execute Action: On Virtual Machine OS Object Mapping: Resource Type: CloudCenter Deployed VMs Application Profile: All Cloud Region: All Cloud Account: All Service All Resource Type: Imported VMs (with Agent Installed) Cloud Region: All Cloud Account: All OS Types: All Action Definition: Execute From Bundle: Yes Location: The repo you uploaded it to, and the path to the Sensu.zip file Script From Bundle: sensuinstall.sh

Save action and create another new action Type: Command or Script Action Name: Unregister Sensu Description: Stops Sensu client and unregisters it with the server Execute Action: On Virtual Machine OS Object Mapping:

Resource Type: CloudCenter Deployed VMs Application Profile: All Cloud Region: All Cloud Account: All Service All Resource Type: Imported VMs (with Agent Installed) Cloud Region: All Cloud Account: All OS Types: All Action Definition: Execute From Bundle: Yes Location: The repo you uploaded it to, and the path to the Sensu.zip file Script From Bundle: sensuuninstall.sh Save Action

You can now use these actions on any deployed VM to register it to your Sensu server and unregister. Note that unregister does not uninstall the Sensu client, it just stops the service and removes it from the server's database (DB). Related Information Sensu Actions Library Technical Support & Documentation - Cisco Systems