NSClient Workshop: 04 Protocols
-
Upload
michael-medin -
Category
Documents
-
view
207 -
download
1
Transcript of NSClient Workshop: 04 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
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
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
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