Configure Sensu And Other Actions To Register Clients

3y ago
36 Views
2 Downloads
504.55 KB
11 Pages
Last View : 16d ago
Last Download : 3m ago
Upload by : Axel Lin
Transcription

Configure Sensu and other Actions toRegister tsComponents UsedBackground InformationConfigureInstall Epel RepositoryInstall ErlangInstall Redis, RabbitMQ, and Configure RabbitMQRegister Sensu RepositoryInstall and Configure SensuEnable Sensu ServicesInstall and Configure UchiwaVerify if the Server RunsConfigure ChecksRestart SensuUpdate Action ScriptsCreate Sensu ActionsRelated InformationIntroductionThis document describes how to configure a Sensu server and other actions on CloudCenter toadd or remove worker Virtual Machines (VMs) from the server.PrerequisitesRequirementsCisco recommends that you have knowledge of these topics: CloudCenter ActionsSensuComponents UsedThis 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 islive, make sure that you understand the potential impact of any command.Background InformationSensu is a program designed to monitor various aspects of a machine. It can be incorporated intoCloudCenter to provide increased monitoring ability to any deployed VM's. This walkthrough isdesigned to be an example that shows how you can integrate Sensu with CloudCenter with theuse of actions.ConfigureThis is designed to run on a CentOS 7 VM that has direct access to the internet. If you need toconnect 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 theterminal.Install Epel Repositorysudo yum -y install epel-releaseInstall Erlangsudo yum -y install erlangInstall Redis, RabbitMQ, and Configure RabbitMQsudo rpm --import c.ascsudo rpm -Uvh 3.4.1/rabbitmq-server-3.4.11.noarch.rpmsudo rabbitmq-plugins enable rabbitmq managementsudo yum -y install redissudo chkconfig redis onsudo service redis startsudo chkconfig rabbitmq-server onsudo /etc/init.d/rabbitmq-server startsudo rabbitmqctl add vhost /sensusudo rabbitmqctl add user sensu secretsudo rabbitmqctl set permissions -p /sensu sensu ".*" ".*" ".*"Register Sensu Repositoryecho '[sensu]name sensu-mainbaseurl http://repositories.sensuapp.org/yum/el/7/x86 64/gpgcheck 0enabled 1' sudo tee /etc/yum.repos.d/sensu.repoInstall and Configure Sensusudo yum -y install sensu

sudo rm -f /etc/sensu/config.json.exampleecho '{ "api": { "host": "localhost", "bind": "0.0.0.0", "port": 4567 } }' sudo tee/etc/sensu/conf.d/api.jsonecho '{ "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.jsonecho '{ "rabbitmq": { "host": "127.0.0.1", "port": 5672, "vhost": "/sensu", "user": "sensu","password": "secret" } }' sudo tee /etc/sensu/conf.d/rabbitmq.jsonecho '{ "redis": { "host": "127.0.0.1", "port": 6379 } }' sudo tee /etc/sensu/conf.d/redis.jsonecho '{ "transport": { "name": "rabbitmq", "reconnect on error": true } }' sudo tee/etc/sensu/conf.d/transport.jsonEnable Sensu Servicessudosudosudosudosudosudochkconfig sensu-server onchkconfig sensu-client onchkconfig sensu-api onservice sensu-server startservice sensu-client startservice sensu-api startInstall and Configure Uchiwasudo yum -y install uchiwaecho '{"sensu": [{"name": "sensu","host": "localhost","port": 4567,"timeout": 10}],"uchiwa": {"host": "0.0.0.0","port": 3000,"refresh": 10}}' sudo tee /etc/sensu/uchiwa.jsonsudo chown uchiwa:uchiwa /etc/sensu/uchiwa.json sudo chmod 664 /etc/sensu/uchiwa.json sudochkconfig uchiwa on sudo service uchiwa startVerify if the Server RunsNavigate to IPAddress: 3000/#/events

At this point, you should have one client called Sensu-server.Configure Checksecho '{"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.jsonecho '{ "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.jsonecho '{ "checks": { "check memory linux": { "handlers": ["mailer"], rcent.rb -w 80 -c 90 ", "interval": 60, "occurrences":5, "refresh": 1800, "subscribers": [ "linux" ] } } }' sudo tee/etc/sensu/conf.d/check memory linux.jsonsudo sensu-install -p cpu-checks sudo sensu-install -p disk-checks sudo sensu-install -p memorychecksRestart Sensusudo service sensu-client restart && sudo service sensu-server restart && sudo service sensu-apirestartAfter 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 thatdevice.Update Action Scripts1. 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 DELETEhttp://SensuServerIP:4567/clients/ cliqrNodeHostname to have the IP address of the SensuServer.7. Zip the modified files back into Sensu.zip.8. Upload to a repository that the CloudCenter Manager (CCM) has configured.Create Sensu ActionsNavigate to Actions Library and select New Action.Type: Command or ScriptAction Name: Register SensuDescription: Installs Sensu client and registers it with the serverExecute Action: On Virtual Machine OSObject Mapping:Resource Type: CloudCenter Deployed VMsApplication Profile: AllCloud Region: AllCloud Account: AllService AllResource Type: Imported VMs (with Agent Installed)Cloud Region: AllCloud Account: AllOS Types: AllAction Definition:Execute From Bundle: YesLocation: The repo you uploaded it to, and the path to the Sensu.zip fileScript From Bundle: sensuinstall.sh

Save action and create another new actionType: Command or ScriptAction Name: Unregister SensuDescription: Stops Sensu client and unregisters it with the serverExecute Action: On Virtual Machine OSObject Mapping:

Resource Type: CloudCenter Deployed VMsApplication Profile: AllCloud Region: AllCloud Account: AllService AllResource Type: Imported VMs (with Agent Installed)Cloud Region: AllCloud Account: AllOS Types: AllAction Definition:Execute From Bundle: YesLocation: The repo you uploaded it to, and the path to the Sensu.zip fileScript From Bundle: sensuuninstall.shSave Action

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

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 .

Related Documents:

SYSTEMATIC PALEONTOLOGY SAURISCHIA Seeley, 1887 SAUROPODOMORPHA von Huene, 1932, sensu Galton and Upchurch, 2004 SAUROPODA Marsh, 1878, sensu Wilson, 2005 GRAVISAURIA Allain and Aquesbi, 2008 RHOETOSAURUS BROWNEI Longman, 1926 (Figs. 2–14) Hypodigm—The syntype series (described in Longman, 1926)

Class Osteichthyes Huxley, 1880 (sensu Friedman & Brazeau, 2010) Subclass Actinopterygii Woodward, 1891b Teleostei Müller, 1844 (sensu de Pinna, 1996) Remarks – The bony fishes include two major divisions. Living sarcopterygians comprise the lobe-finned coelacanth and lungfishes, and, perhaps unexpectedly, the terrestrial vertebrates or .

Add or remove memory in running a VM . Configure dynamic memory . Configure Non-Uniform Memory Access (NUMA) support . Configure smart paging . Configure resource metering . Manage Integration Services . Create and configure Generation 1 and 2 VMs and determine appropriate usage scenarios . Implement enhanced session mode . Create Linux and .

Configure KeyCloak as OIDC provider for Connections SSO between Connections, SameTime and Domino Configure KeyCloak to connect to an LDAP Configure WAS as OIDC RP Configure WAS as OIDC RP in multi-clusters env multi-clusters- make sure set- Trusted authentication realms - outbound Configure Connections Application user roles

Login to the PBX Graphical User Interface ("GUI") Register your PBX Configure Asterisk SIP Settings Sysadmin Module Setup Set a Static IP Address and Configure DNS Configure E-Mail Settings Configure Email Server Configure E-Mail Alert Destination Addresses Setting the Time Zone Setting a Hard Drive Failure / Fill-Up Notification E-Mail Address

Part 1: Basic Router/Switch/PC Configuration In Part 1 of this lab, you will configure basic settings on the routers, such as interface IP addresses and static routing. Note: Do not configure ASA settings at this time. Step 1: Configure basic settings for routers and switches. a. Configure hostnames as shown in the topology for each router. b.

UTM Configure antivirus and email filtering, web filtering, intrusion protection, data leak prevention, and application control. VPN Configure IPSec and SSL virtual private networking. User Configure user accounts for use with firewall policies that require user authentication. Also configure external authentication servers such as

8 Annual Book of ASTM Standards, Vol 14.02. 9 Annual Book of ASTM Standards, Vol 03.03. 10 Annual Book of ASTM Standards, Vol 03.06. 11 Available from American National Standards Institute (ANSI), 25 W. 43rd St., 4th Floor, New York, NY 10036. 12 Available from American Society of Mechanical Engineers (ASME), ASME International Headquarters, Three Park Ave., New York, NY 10016-5990. 13 .