This presentation will show how you can create groups of checks like CPU metrics, Oracle metrics or IIS metrics and push them to all of the hosts that require them. The presentation will provide a script that will allow you to select and implement hundreds of groups of checks that have been developed for NRPE, NCPA, WMI, NSClient++, NRDP and NRDS.
3. 2015 3
Goals: Rapid Deployment of Services
Cut Deployment Time by 50%
Through accurate analysis and the use of scripts reduce the time
needed to create an efficient design.
Increase Efficient Management by 75%
Dramatically change the way service checks, templates and hosts
are implemented and managed.
5. 2015 5
Strategy: Analysis
Hardware / Virtual
Evaluate the type of server you will be monitoring to implement
SNMP for hardware and monitor the hosts for the virtual
environments.
Network Topology and Firewalls
List the network infrastructure that will be monitored, the firewall
limitations and the data centers.
Host Types
This analysis will also require the version of the OS as well as the
environment it will be running in like production, developement,
etc.
Settings
Analyze each of the triggers for each service check required and
who will be included in the notification/escalation process.
6. 2015 6
Strategy: Design
Network Requirements
* firewalls
* data centers
Host Requirements
* What needs to be checked?
Service Check Requirements
* triggers
* timing
Notification/Escalation Requirements
* Who gets notfied and when.
7. 2015 7
Strategy: Evaluation
Build a Test Environment
* Simulate the real thing!
Build One Host for Each Type
* Hammer them...verify everything.
Build Notification/Escalation
* Do the work, implement as you go
9. 2015 9
Strategy: Rapid Deployment
Deploy Templates, Service Checks Structure,
Notification
Deploy Hosts, Service Checks and Parents
10. 2015 10
Strategy: Efficient Management
Create Leverage
* Control Services From One Template
* Plan for Exceptions
5 Piece Model
* host
* host template (attached to host)
* hostgroup (attached to host)
* service template (attach to hostgroup)
* services (attach to service template)
14. 2015 14
Principles for Service Check Group Deployment
Group Prepared Checks
Create groups of checks that allow for rapid deployment of
services needed. (CPU checks, Memory checks, etc.)
Efficient Management of Group Checks
Using object inheritance create service templates and services.
Script Deployment
Build scripts that will enable you to input data to create pre-created
templates and services.
15. 2015 15
Script Functions
Deploy Selection of Group
Deploy Token and IP Address
This process build useful service checks so you do not need to
make modifications.
Deploy Skeleton Structure
* hostgroup
* service template
* services
* commands
* definitions
19. 2015 19
Group Prepared Checks
Windows
* NCPA: Browser Access, API with Graphing, Passive
* WMI
* NSClient++: NRPE, NT
* Eventlog Filters
Linux
* NRPE
* NCPA: Browser Access, API with Graphing, Plugins, Passive
* NRDS
* NRDP
* SNMP
20. 2015 20
Focus: NCPA - Windows Performance Counters
NCPA: Performance Counter Definitions
NCPA: Browser Access to API
NCPA: Service Check with Graphing
NCPA: Passive Checks
21. 2015 21
NCPA:Windows Perf Counter Definitions
Write Definitions
Create definitions for each counter so
users have some idea about what the
counter does.
Group Definitions
Create groups for definitions so the user can review relevant
information and options.
Access the Definitions from the Script
22. 2015 22
Windows Perf Counter Definitions: Examples
Processor:% Processor Time
This counter measures how much time the processor spends in
productive time. The counter simply subtracts the percentage from
100%. So in the example “1” indicates it is only doing productive
activities for 1% of the time. Note this check is for core “0”, for
additional cores change that number. If you wanted to check all
core use “*”.
TCPv4: Connection Failures
This is the raw number of TCP connections that have failed since
the server was started. This will typically incur a loss of data so you
should pay attention to this counter.
23. 2015 23
Script Function: Definitions
Write Definitions for Each Counter
Create definitions for each counter so users have some idea about
what the counter does.
Group Definitions
Create groups for definitions so the user can review relevant
information and options.
Access the Definitions from the Script
24. 2015 24
Windows Perf Counter Definitions: Script
Make the group selection you want to implement
1) --- Review Windows Performance Counter Definitions
2) --- Select Windows NCPA Browser Access Options
3) --- Select Windows NCPA Active Options
4) --- Select Windows NCPA Passive Options
q) --- Quit
Please Type Your Selection:
1
cache_win_ncpa.txt process_win_ncpa.txt icmp_win_ncpa.txt
job_object_win_ncpa.txt ras_total_win_ncpa.txt memory_win_ncpa.txt server_win_ncpa.txt
net_adapter_win_ncpa.txt server_work_queue_win_ncpa.txt net_interface_win_ncpa.txt smtp_server_win_ncpa.
objects_win_ncpa.txt system_win_ncpa.txt paging_win_ncpa.txt tcpv4_win_ncpa.txt
physical_disk_win_ncpa.txt tcp_win_ncpa.txt print_queue_win_ncpa.txt term_serv
processor.txt thread_win_ncpa.txt processor_win_ncpa.txt
Which Windows Performance Counter definition would you like more information on?
process_win_ncpa.txt
Process(*): % Processor Time
This process performance counter represents the rate of used time in which the threads are used
25. 2015 25
Browser API Access
API Checks with Browser
The purpose of the script is to convert the
desired group into usable checks to be
dropped into a browser.
Convert Links to ASCII
In order for the links to work, they must be converted into ASCII.
Your browser will encode input, according to the character-set used in your page. The default
character-set in HTML5 is UTF-8.
space %20
( %28
) %29
* %2A
/ %2F
: %3A
-
https://104.130.136.58:5693/api/windowscounters/Memory/Available%20Bytes?token=na
gios
26. 2015 26
Script: API Access via a Browser
Make the group selection you want to implement
1) --- Review Windows Performance Counter Definitions
2) --- Select Windows NCPA Browser Access Options
3) --- Select Windows NCPA Active Options
4) --- Select Windows NCPA Passive Options
q) --- Quit
27. 2015 27
Access API Via the Browser: (488 checks)
ncpa_active_browser.cfg win_ncpa_api_paging_file.cfg win_ncpa_api_tcp_perform_diag.cfg
win_ncpa_api_cache.cfg win_ncpa_api_physdisk.cfg win_ncpa_api_teleph
win_ncpa_api_dist_trans.cfg win_ncpa_api_print_queue.cfg win_ncpa_api_teredo_client.cfg
win_ncpa_api_dns64_global.cfg win_ncpa_api_process.cfg win_ncpa_api_teredo_relay.cfg
win_ncpa_api_http_service.cfg win_ncpa_api_processor.cfg win_ncpa_api_teredo_server.cfg
win_ncpa_api_iphttps.cfg win_ncpa_api_processor_info.cfg win_ncpa_api_terminal_services.cfg
win_ncpa_api_job_object.cfg win_ncpa_api_security_systemwide.cfg win_ncpa_api_thread.cfg
win_ncpa_api_logicaldisk.cfg win_ncpa_api_server.cfg win_ncpa_api_winsock.cfg
win_ncpa_api_memory.cfg win_ncpa_api_server_sessions.cfg
win_ncpa_api_objects.cfg win_ncpa_api_system.cfg
Which group would you like to deploy?
win_ncpa_api_memory.cfg
What is the IP Address of the host you want to view:
104.130.136.58
What is your token for the host?
nagios
https://104.130.136.58:5693/api/windowscounters/Memory/Available%20Bytes?token=nagios
https://104.130.136.58:5693/api/windowscounters/Memory/Committed%20Bytes?token=nagios
28. 2015 28
Access API Via the Browser: (copy / paste)
https://104.130.136.58:5693/api/windowscounters/Memory/Available%20Bytes?token=nagios
{
"value": {
"windowscounters": [
[
1095032832.0
],
"Available Bytes"
]
}
}
29. 2015 29
NCPA: Service Check with Graphing
Active Performance Counters
40 Groups
478 Service Checks
Built In Graphing
Automated Installation
hostgroups
service templates
commands
services
30. 2015 30
Script: Active Checks with Graphing (488 checks)
Make the group selection you want to implement
1) --- Review Windows Performance Counter Definitions
2) --- Select Windows NCPA Browser Access Options
3) --- Select Windows NCPA Active Options
4) --- Select Windows NCPA Passive Options
q) --- Quit
31. 2015 31
Access API Via the Browser: (478 checks)
ncpa_perf_Cache.cfg ncpa_perf_Security_Per_Proces
ncpa_perf_Distributed_Transaction_Coordinator.cfg ncpa_perf_Security_System.cfg
ncpa_perf_DNS64_Global.cfg ncpa_perf_Server.cfg
ncpa_perf_HTTP_Service.cfg ncpa_perf_Server_Work_Queues.cfg
ncpa_perf_ICMP.cfg ncpa_perf_System.cfg
ncpa_perf_IPHTTPS_Global.cfg ncpa_perf_TCPIP_Performance.cfg
ncpa_perf_IPv4.cfg ncpa_perf_TCPv4.cfg
ncpa_perf_Job_Object.cfg ncpa_perf_Telephony.cfg
ncpa_perf_Job_Object_Details.cfg ncpa_perf_Teredo_Client.cfg
ncpa_perf_Logical_Disk.cfg ncpa_perf_Teredo_Relay.cfg
ncpa_perf_Memory.cfg ncpa_perf_Teredo_Server.cfg
ncpa_perf_Microsoft_Winsock.cfg ncpa_perf_Terminal_Services.cfg
ncpa_perf_Network_Adapter.cfg ncpa_perf_Terminal_Services_Session.cfg
ncpa_perf_Network_Interface.cfg ncpa_perf_Thread.cfg
ncpa_perf_Objects.cfg ncpa_perf_UDPv4.cfg
ncpa_perf_Paging_File.cfg ncpa_perf_Web_Service_Cache
ncpa_perf_Physical_Disk.cfg ncpa_perf_Web_Service_Cache_Kernel.cfg
ncpa_perf_Print_Queue.cfg ncpa_perf_Web_Service_Cache
ncpa_perf_Process.cfg ncpa_perf_Web_Service_.cfg
ncpa_perf_Processor.cfg ncpa_perf_Web_Service.cfg
ncpa_perf_processor_info.cfg
Which group would you like to deploy?
win_ncpa_api_memory.cfg
What is the IP Address of the host you want to view:
104.130.136.58
What is your token for the host?
nagios
https://104.130.136.58:5693/api/windowscounters/Memory/Available%20Bytes?token=nagios
32. 2015 32
Active Checks with Graphing: (478 checks)
What services do you want to deploy?
ncpa_perf_Cache.cfg
What is the token you are using for your hosts?
nagios
What service template would you like to use?
ncap_perf.cfg
Running pre-flight check on configuration data...
Checking objects...
Checking for circular paths...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...
Stopping nagios: done.
Starting nagios: done.
39. 2015 39
NCPA: Service Check with Graphing
Active Performance Counters
40 Groups
478 Service Checks
Built In Graphing
Automated Installation
hostgroups
service templates
commands
services
40. 2015 40
NCPA: Passive Service Checks
Passive Performance Counters
40 Groups
478 Service Checks
Copy / Paste
41. 2015 41
Script: Passive Checks
Make the group selection you want to implement
1) --- Review Windows Performance Counter Definitions
2) --- Select Windows NCPA Browser Access Options
3) --- Select Windows NCPA Active Options
4) --- Select Windows NCPA Passive Options
q) --- Quit
42. 2015 42
Passive Service Check: (478 checks)
win_ncpa_pass_cache.txt win_ncpa_pass_net_interface.txt win_ncpa_pass_process.txt
win_ncpa_pass_memory.txt win_ncpa_pass_print_que.txt win_ncpa_pass_system.txt
win_ncpa_pass_net_adapter.txt win_ncpa_pass_processor.txt win_ncpa_pass_tcpv4.txt
What group would you like to use?
win_ncpa_pass_objects.txt
What is the token you are using for your hosts?
Nagios
%HOSTNAME%|Objects Threads = /api/windowscounters/Objects/Threads?token=nagios
%HOSTNAME%|Objects Events = /api/windowscounters/Objects/Events?token=nagios
%HOSTNAME%|Objects Mutexes = /api/windowscounters/Objects/Mutexes?token=nagios
%HOSTNAME%|Objects Sections = /api/windowscounters/Objects/Sections?token=nagios
44. Questions
Send me an email if you would
like to try out the script:
mweber@spidertools.com
Questions
Send me an email if you would
like to try out the script:
mweber@spidertools.com