nsclient workshop: 04 protocols

32
monitoring Protocols

Upload: michael-medin

Post on 13-Jul-2015

207 views

Category:

Documents


1 download

TRANSCRIPT

monitoring

Protocols

Active Passive Realtime Future

Every x minute Every x minute Only on errors Only on errors

For each service For most services Only on errors Only on errors

Very chatty Very chatty Less chatty Not chatty

NRPE NRPE (ish)

NSCA NSCA

check_nt (ish)

NRDP

REST REST REST REST

NSCP NSCP NSCP NSCP

NRPEServer

Core

CheckSystem

CheckEventLog

CheckExternalScripts

check_foo.bat

QUERYNRPE

(1024)

QUERY

Port: 5666

allowed hosts

arguments

arguments

insecure=true

Configuring NRPE

3:1 Using NRPE

You know this one by now…

Enable NRPE

Run check_memory via NRPE

Enable NRPE

Run check_memory via NRPE

nscp help

nscp nrpe help

# Dont forget to (re)start NSClient++

Enable NRPE

Run check_memory via NRPE

nscp help

nscp nrpe help

# Dont forget to (re)start NSClient++

nscp nrpe --help

nscp nrpe install --help

Enable NRPE

Run check_memory via NRPE

nscp nrpe install --insecure true

--allowed-hosts 127.0.0.1 --arguments safe

check_nrpe --insecure --host 127.0.0.1

--command check_memory

Scheduler

Core

CheckSystem

CheckEventLog

CheckExternalScripts

check_foo.bat

QUERY

NSCA(512)

QUERY

Target: nsca

addressport

passwordencryptioncommands

intervalEtc…

NSCAClient

Notification

Using NSCA

3:2 Enable NSCA

Setup a check_cpu check every 5 seconds.

Send the result via NSCA to localhost:5667

No encryption, password=test

Setup a check_cpu check every 5 seconds.

Send the result via NSCA to localhost:5667

No encryption, password=test

Enable, Scheduler and NSCAClient

First add a schedule

Then configure default target

Setup a check_cpu check every 5 seconds.

Send the result via NSCA to localhost:5667

No encryption, password=test

Enable, Scheduler and NSCAClient

First add a schedule

/settings/scheduler/schedules

Then configure default target

/settings/NSCA/client/targets/default

Setup a check_cpu check every 5 seconds.

Send the result via NSCA to localhost:5667

No encryption, password=test

nscp test --settings nsca_server.ini

nscp test --settings nsca_client.ini

WEBServer

Core

CheckSystem

CheckEventLog

CheckExternalScripts

check_foo.bat

QUERYHTTP

QUERY

Port: 8443, 8080

allowed hosts

arguments

curl--insecure --header "password: PASSWORD“https://localhost:8443/query/QUERY?ARGS

curl--insecure --header "password: PASSWORD“https://localhost:8443/query/check_cpu?show-all

Using REST

3:3 Use REST

Curl can be found under: C:\nsclient\tools

Base URL is: https://localhost:8443/query/QUERY?ARGS

Check check_memory via REST

Whats the difference if you add show-all?

Check check_memory via REST

Whats the difference if you add show-all?

Curl can be found under: C:\nsclient\tools

Base URL is: https://localhost:8443/query/QUERY?ARGS

Enable web server and set the password (see previous lab)

Then use curl

Check check_memory via REST

Whats the difference if you add show-all?

Curl can be found under: C:\nsclient\tools

Base URL is: https://localhost:8443/query/QUERY?ARGS

Enable web server and set the password (see previous lab)

Then use curl

Don’t forget: --insecure, --header "password: PASSWORD“

Check check_memory via REST

Whats the difference if you add show-all?

Curl can be found under: C:\nsclient\tools

Base URL is: https://localhost:8443/query/QUERY?ARGS

curl --insecure --header "password: PASSWORD“

https://localhost:8443/query/check_memory?show-all