CMDBs and Check_MK Linux höchstpersönlich.



Similar documents
How To Backup In Cisco Uk Central And Cisco Cusd (Cisco) Cusm (Custodian) (Cusd) (Uk) (Usd).Com) (Ucs) (Cyse

JMETER - MONITOR TEST PLAN

Oracle Managed File Getting Started - Transfer FTP Server to File Table of Contents

Product Manual. MDM On Premise Installation Version 8.1. Last Updated: 06/07/15

depl Documentation Release depl contributors

ICINGA2 OPEN SOURCE MONITORING

Eylean server deployment guide

Cloud Powered Mobile Apps with Microsoft Azure

Avalanche Remote Control User Guide. Version 4.1.3

Basic, Professional & Professional Box

Application Discovery Manager User s Guide vcenter Application Discovery Manager 6.2.1

Web+Center Version 7.x Windows Quick Install Guide 2 Tech Free Version Rev March 7, 2012

NTP Software VFM Administration Web Site for EMC Atmos

Cisco Configuration Professional Workshop

Why API? Using the REST API in an education environment. JAMF Software, LLC

Extending Remote Desktop for Large Installations. Distributed Package Installs

The road to lazy monitoring with Icinga2 & Puppet. Tom De

Mobile Device Management Version 8. Last updated:

Dell OpenManage Network Manager Version 5.3 Service Pack 2 Quick Start Guide

Administration Quick Start

STK Terrain Server Installation Guide

Hosted Exchange 2010

EMC Documentum Connector for Microsoft SharePoint

Dell OpenManage Network Manager Version 6.0. Quickstart Guide

Manual Password Depot Server 8

WebSpy Vantage Ultimate 2.2 Web Module Administrators Guide

General principles and architecture of Adlib and Adlib API. Petra Otten Manager Customer Support

Vault Project - Plant Database Replication. Contents. Software Requirements: AutoCAD Plant 3D 2016 and AutoCAD P&ID 2016

Secure Linux Administration Conference Bernd Strößenreuther

TIBCO Spotfire Automation Services Installation and Configuration

Smartphone Pentest Framework v0.1. User Guide

Installation Manual v2.0.0

Resources You can find more resources for Sync & Save at our support site:

IceWarp to IceWarp Server Migration

Apache Server Implementation Guide

Version 1.0 January Xerox Phaser 3635MFP Extensible Interface Platform

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

Avalanche Site Edition

BMC Remedy Integration Guide

Moderne Sicherheit. Fokussiert auf Business Continuity, Mobilität & Application Control. Marc Mathys Country Manager Switzerland

Introduction to Google Apps for Business Integration

Tracking Network Changes Using Change Audit

Secure Web Appliance. Reverse Proxy

Tool for Automated Provisioning System (TAPS) Version 1.2 (1027)

Configuring Nex-Gen Web Load Balancer

User Manual. Onsight Management Suite Version 5.1. Another Innovation by Librestream

Tonido Cloud Admin Guide

Administering Cisco ISE

LICENSE4J FLOATING LICENSE SERVER USER GUIDE

ovirt Introduction James Rankin Product Manager Red Hat Virtualization Management the ovirt way

insync Installation Guide

NetBrain Security Guidance

Ethernet I/O System. SNMP manual V1.0

Step-by-Step Guide for Microsoft Advanced Group Policy Management 4.0

Acano solution. Acano Manager R1.1 FAQs. Acano. December G

1. INTERFACE ENHANCEMENTS 2. REPORTING ENHANCEMENTS

Continuous security audit automation with Spacewalk, Puppet, Mcollective and SCAP

FileCruiser. VA2600 SR1 Quick Configuration Guide

End of Sale/End of Life Report Tool Usage Notes for CiscoWorks NCM 1.6

CitectSCADA V7.20 WebClient Quick Start Guide

Avaya Video Conferencing Manager Deployment Guide

MIS Export via the FEM transfer software

Cloud Powered Mobile Apps with Azure

NSi Mobile Installation Guide. Version 6.2

SysPatrol - Server Security Monitor

Static webpages with Pelican

Smart Business Architecture for Midsize Networks Network Management Deployment Guide

IM and Presence Disaster Recovery System

Release Management PinkVerify v2.1. Mandatory Criteria

Richmond SupportDesk Web Reports Module For Richmond SupportDesk v6.72. User Guide

TIBCO Runtime Agent Domain Utility User s Guide Software Release November 2012

WESTERNACHER OUTLOOK -MANAGER OPERATING MANUAL

Systems Management. Release Notes

c360 Portal Installation Guide

Service Anywhere. Release Notes

Contents. 2 Alfresco API Version 1.0

Juniper Secure Analytics Release Notes

Amazon Elastic Beanstalk

Table of contents 1. IMPORTANT INFORMATION BEFORE YOU START GETTING STARTED EXCHANGE CONTROL PANEL... 2

User Guide. Version 3.2. Copyright Snow Software AB. All rights reserved.

Configuring Secure Socket Layer (SSL) for use with BPM 7.5.x

Bomgar Cloud Support Admin 15.1

1. INTERFACE ENHANCEMENTS 2. REPORTING ENHANCEMENTS

CA ehealth. Administration Guide. r6.1

Fairsail REST API: Guide for Developers

System Administration Guide

Shipbeat Magento Module. Installation and user guide

The data between TC Monitor and remote devices is exchanged using HTTP protocol. Monitored devices operate either as server or client mode.

Background Deployment 3.1 (1003) Installation and Administration Guide

IBM Watson Ecosystem. Getting Started Guide

FILECLOUD HIGH AVAILABILITY

Simian. Enterprise Mac OS X Software Deployment. John Randolph and Justin McWilliams Software Google

Working With Virtual Hosts on Pramati Server

MIB Explorer Feature Matrix

Oracle Communications WebRTC Session Controller: Basic Admin. Student Guide

MUK-IT 63. Roundtable. Herzlich Willkommen bei der Software AG. Anton Hofmeier VP Sales Terracotta DACH / MdGL

Introduction to the Secure Gateway (SEG)

Transcription:

CMDBs and Check_MK

whoami? working with Linux since 20 years working at Heinlein Support since 3.5 years working with Check_MK since 3 years trainer & consultant for Check_MK (and other topics)

part 1 automate check_mk config?

automation makes life easier configuration is reproducible monitor deployed hosts, not manually configured hosts always up to date central repository for configuration easier documentation fewer manual steps fewer errors

sources of automation CMDB configuration management database information pool deployment tools SaltStack Puppet Chef Ansible dynamically generated hostnames

what can be automated? host properties Hostnames Location in folder tree Tags IP addresses discovery config activation NOT Rules Tag groups and aux tags

part 2 how to automate check_mk config?

method 1 wato_import.py imports CSV folder;hostname;hostalias;ip address creates a new hosts.mk in folder overwrites existing hosts no handling of host tags no deletion or modification of hosts suitable for one time imports at the start of a fresh site folders with assigned tags /share/doc/check_mk/treasures

method 2 creating hosts.mk write your own code to create hosts.mk and.wato in folders extend all_hosts update ipaddresses extend extra_host_conf['alias'] update host_attributes create.wato file {'attributes': {}, 'num_hosts': 1, 'title': u'folder Name'}

Service Discovery & Activation for file based methods cmk -II cmk -O

method 3 WATO web API talks JSON authenticates only automation users add single host edit single host delete single host get single host get all hosts discover services for one host activate changes

WATO web API request basics endpoint: http://{server}/{omdsite}/check_mk/webapi.py URL parameters _username _secret action (add_host, edit_host, etc.) mode (optional) payload data request (JSON formatted) { "hostname": "serv001" }

WATO web API add host action=add_host request={ "attributes": { "tag_criticality": "prod", "tag_agent": "cmk-agent", "alias": "Server 001", "ipaddress": "127.0.0.1", }, "folder": "os/linux", "hostname": "serv001" } Tags: "tag_<taggroupid>": "<tagid>"

WATO web API edit host action=edit_host request={ "attributes": { "site": "testsite2", "tag_networking": "dmz" }, "unset_attributes": ["tag_criticality"], "hostname": "serv001" } hostname is unique even on distrobuted sites unset attributes inherits attributes from folder properties

WATO web API get, discover, delete host action=delete_host action=get_host effective_attributes=1 for inherited attributes action=discover_services mode in new, remove, fixall, refresh request={ "hostname": "serv001" }

WATO web API get all hosts, activate changes action=get_all_hosts effective_attributes=1 for inherited attributes action=activate_changes allow_foreign_changes=1 to allow non-api changes serializes multiple sites timeout possible mode in dirty, all, specific request={ "sites": ["site_nr1", "site_nr2"] }

status checks, commands: multisite web API use views in multisite get HTML, JSON or Python data structures execute commands by "emulating" browser request setting downtime on service Dummy host localhost: view.py?_do_confirm=yes &_transid=-1 &_do_actions=yes &service=dummy &host=localhost &site= &view_name=service &_down_2h=2+hours &_down_comment=test

CLI for WATO Web-API omdclient omd-host-crud create, read, update & delete omd-activate omd-puppet-enc Uses Puppet External Node Classifier to create/remove hosts omd-nagios-ack omd-nagios-downtime early stage of development fixed environment (tag groups "role" & "instance")

CMDB product i-doit tight integration with check_mk presented last year on this conference service trees used as configurations for check_mk corresponding result data fed back to i-doit. live analysis of the impact on the service tree in the case of malfunctions of individual components.

Conclusion file based methods fast file based methods need knowledge about internal data structures file based methods need shell access to monitoring site Web-API may be slow Web-API talks JSON Web-API needs https access to monitoring site

part 3 CMDB sync

CMDB: LANsweeper XML export <DocumentElement> <Server> <AssetTypename>Linux</AssetTypename> <AssetName>www01.example.com</AssetName> <Description>Webserver 01</Description> <IPAddress>192.0.2.1</IPAddress> <Landscape>Production</Landscape> <Monitored>yes</Monitored> <Business_Classification>Marketing</Business_Classification> <RelationType>Supported By</RelationType> <Name>Robert Sander</Name> <RelationComment>Primary</RelationComment> </Server> </DocumentElement> multiple <Server> elements per host due to relationship

mapping XML element AssetTypename AssetName Description IPAddress Landscape Check_MK attribute folder hostname alias ipaddress & monitoring site / location tag_criticality Monitored tag_criticality (no offine) Business_Classification RelationType Name RelationComment tag_customer tag_owner tag_contact-primary tag_contact-backup

Python API calls using Python Requests: HTTP for Humans module def api_request(params, data=none, errmsg='error'): if data: resp = requests.post(apiurl, params=params, data='request=%s' % json.dumps(data)) else: resp = requests.get(apiurl, params=params) resp = resp.json() if resp['result_code'] == 1: raise RuntimeError('%s: %s' % ( errmsg, resp['result'] )) return resp['result']

params & data params = { '_username':, '_secret':, 'action': 'add_host' } data = { 'hostname': 'www01.example.com', 'folder': 'server/linux', 'attributes': { 'alias': 'Webserver 01', 'ipaddress': '192.0.2.1', 'site': 'monsite01', 'tag_criticality': 'prod', 'tag_customer': 'marketing', 'tag_contact-primary': 'rsander', 'tag_owner': 'hketchup', } }

part 4 demo

links https://mathias-kettner.de/checkmk_wato_cmdb.html https://mathias-kettner.de/checkmk_wato_webapi.html https://mathias-kettner.de/checkmk_multisite_automation.html https://github.com/tskirvin/omdclient http://www.i-doit.com/product/interfaces/ http://mathiaskettner.de/check_mk_konferenz_videos_2014_9.html http://www.python-requests.org

Natürlich und gerne stehe ich Ihnen jederzeit mit Rat und Tat zur Verfügung und freue mich auf neue Kontakte. Robert Sander Mail: r.sander@heinlein-support.de Telefon: 030/40 50 51 43 Wenn's brennt: Heinlein Support 24/7 Notfall-Hotline: 030/40 505-110

Wir suchen: Admins, Consultants, Trainer! Wir bieten: Spannende Projekte, Kundenlob, eigenständige Arbeit, keine Überstunden, Teamarbeit...und natürlich: Linux, Linux, Linux... http://www.heinlein-support.de/jobs

Heinlein Support hilft bei allen Fragen rund um Linux-Server HEINLEIN AKADEMIE Von Profis für Profis: Wir vermitteln die oberen 10% Wissen: geballtes Wissen und umfangreiche Praxiserfahrung. HEINLEIN HOSTING Individuelles Business-Hosting mit perfekter Maintenance durch unsere Profis. Sicherheit und Verfügbarkeit stehen an erster Stelle. HEINLEIN CONSULTING Das Backup für Ihre Linux-Administration: LPIC- 2-Profis lösen im CompetenceCall Notfälle, auch in SLAs mit 24/7-Verfügbarkeit. HEINLEIN ELEMENTS Hard- und Software-Appliances und speziell für den Serverbetrieb konzipierte Software rund ums Thema email.