Presentation is loading. Please wait.

Presentation is loading. Please wait.

NSClient++ in the new millenium!

Similar presentations


Presentation on theme: "NSClient++ in the new millenium!"— Presentation transcript:

1 NSClient++ in the new millenium!
(re)Discovering NSClient++ Name: Michael Medin Blog: Project: NSClient++ Web: Hello my name is Michael Medin. I am from Stockholm, Sweden NSClient++: I am here to talk about NSClient++ (as always) but NOT about Windows (so much) this time Different: For those of you who have seen me before (Means I will screw up more) Questions: Any questions: feel free to chime in at any time

2 No disclaimer this year…
Still your fault though!

3 Michael Medin dev not ops worked in ops a long time ago by misstake
Always been a fan of DEVOPS Work with soa work with “soa” not, C/C++, nagios, icinga, …

4 No agenda this year either…

5 About NSClient++ (the program)
linux and windows <0.4.0 Since 2003? Open source Open source not open core 0.4.0: xx modular (pluggable) Written in C++ Since 2003 Windows (pre 0.4.0) Linux and Windows Modular Open source (not core) 0.4.0 (may) 0.4.1 (October) 0.4.2 (next year) Releases every year (in the past) .0 and .1 (same same) .2 and .3 (same same) 0.4.1 is the new stable, means is legacy, 0.3.9: Time to move on: QUEUE Comic 0.4.1: xx 0.4.2: xx?

6 About NSClient++ (the project)
one-man-band no company , no commercial version , no payed time Please don’t be angry! but… sponsoring! = feedback donations! One man band Don’t be angry If I missed your comment … it was because I forgot not because I hate you support?

7 NSClient++ (What can I do?)
Update the wiki! Fork me on github Respond in the forums… Submit patches Submit bug reports Update wiki Use the forums Submit patches Fork on github Report bugs Come with ideas Tell me what you need Come with ideas Tell me what you need!

8 NSClient++ (What’s new)
Sockets: ipv6, ssl (true) Protocols: NRPE, NSCA, NRDP, check_mk, check_nt, Graphite, syslog, smtp Real-time checks (eventlog, logfiles) Whats new? Sockets Protocols Realtime checks Command line syntax Command line syntax

9 Thank you! Thank you to my sponsors

10 More then a 1000 words? The logo: Windows

11 …for windows… ∘ • but it runs on linux …time for a new logo? Probably!
By ~Nac-Mac-Feegle but it runs on linux …time for a new logo? …for windows… Probably! Runs on Linux

12 Building on Linux ∘ • apt-get install …
git clone git://github.com/mickem/nscp.git mkdir build ; cd build cmake ../nscp apt-get install git clone mkdir build cmake make make

13 Building on windows… ∘ • Get visual studio (express), python and cmake
Download unpack nscp source python nscp\build\python\fetchdeps.py --target x64 --cmake-config dist Manually install visual studio, python, cmake git clone (or download source) Build all dependencies cmake msbuild cmake ../nscp msbuild /p:Configuration=RelWithDebInfo NSCP.sln

14 More then a 1000 words? • ∘ The logo: Daemon
And this is stretching it a bit but I liked the logo transition concept 

15 …daemon ∘ • let me work let nagios/icinga/* rest passive monitoring?
Tobias Leeger let me work …daemon let nagios/icinga/* rest passive monitoring? NO! event based monitoring? real-time monitoring? Distribute your monitoring load (less strain on central server) Luleå story Would you want your doctor to call you every 5 minutes asking if you are ok? The right way to do monitoring? simplified monitoring? preventive monitoring?

16 More then a 1000 words? The logo: Secure

17 Secure monitoring ∘ • Check_nt: no encryption! Check_nrpe:
no authentication, encryption? Check_nsca: no (strong) authentication! Check_mk: no authentication, no encryption! Problems => Solutions Not supported in the various clients though  Check_nrdp: No ecryption (in nsclient++) Check_nscp: Encryption! Authentication!

18 Secure monitoring • ∘ Check_nt: Encryption! Authentication!
Check_nrpe: Encryption! Authentication! Check_nsca: Encryption! Authentication! Check_mk: Encryption! Authentication! Problems => Solutions Not supported in the various clients though  Check_nrdp: No ecryption (Yet!) Check_nscp: Encryption! Authentication!

19 Security ∘ • Strong encryption Ssl (standard) Certificates
Certificate based authentication Client AND(or) server Standard SSL solution …but you never know… Remember clients usually do not support it  Secure? I hope so…

20 ∘ • Secure? I hope so… But you never know… Standard SSL solution
Remember clients usually do not support it  Secure? I hope so… But you never know…

21 DEMO: Using NSClient++
Time to get real… DEMO: Using NSClient++ Time to make a fool of my self 

22 General usage nscp Display all(?) available context nscp --help Get help (can be used in many places) nscp <context or alias> [options] [-- [module options]] General usage syntax

23 Contexts help Get help client Act as a client. (think check_nrpe) Usually aliases we can use instead. service (un)Install and display windows service settings Work with configuration test Find errors and problems unit Run unit test scripts

24 Aliases lua Run lua scripts python Run python scripts nrpe Think check_nrpe nsca Think send_nsca sys Nice pdh front-end (more to come) wmi WMI front end eventlog Add event log message from command line

25 Settings (Configuration)
nscp settings --help nscp settings --add-missing --generate [--load-all] Will update your configuration with ALL keys nscp settings --add-missing --activate-module <module> Great way to "enable a new module“ nscp settings --remove-defaults --generate Will remove all default keys/sections nscp settings --validate Show problems with the settings file Remember there is no "--delete-missing“ (yet)

26 check_nrpe nscp nrpe -- --help
The -- is important nscp nrpe -- -H c foo -a foo bar Execute nrpe query from nsclient++ 0.4.2 will introduce: nrpe_client -H c foo -a foo bar nsca_client … …_client … Time for demo rm nsclient.ini ./nscp settings --activate-module NRPEServer --add-defaults vi nsclient.ini # change port ./nscp settings --remove-defaults --generate #add foo=bar ./nscp settings --validate

27 DEMO: real-time log file monitoring
Time to get real… DEMO: real-time log file monitoring More demos (this time for real)

28 Modules CheckLogFile Subscribes to filechanges SimpleFileWriter
Write notifications to file NSCAClient Submit NSCA messages ./nscp settings --activate-module CheckLogFile --add-defaults vi nsclient.ini # file=./test.txt # filter=column1 like ‘hello’ # warning = column2 like ‘warn’ # critical = column2 like ‘crit’ # destination = FILE ./nscp settings --activate-module SimpleFileWriter ./nscp test echo –e “hello\tworld” echo –e “hello\tcrit” ./nscp settings --activate-module NSCAClient # encryption = xor # password = secret ./nscp settings –generate --remove-defaults NSCP NSCA NSCAClient CheckLogFile FILE SimpleFileWriter

29 Resulting config from DEMO
[/modules] CheckLogFile = enabled SimpleFileWriter = enabled [/settings/logfile/real-time/checks/sample] critical = column2 like 'crit' destination = FILE file = ./test.txt filter = column1 like 'hello' warning = column2 like 'warn' [/settings/logfile/real-time] enabled = true

30 Resulting config from DEMO
[/modules] CheckLogFile = enabled NSCAClient = enabled SimpleFileWriter = enabled [/settings/logfile/real-time/checks/sample] critical = column2 like 'crit' destination = FILE,NSCA file = ./test.txt filter = column1 like 'hello' warning = column2 like 'warn' [/settings/logfile/real-time] enabled = true [/settings/NSCA/client/targets/default] address = encryption = xor password = secret

31 Run the following ./nscp test tail –f ./output.txt echo –e “hello\tworld” echo –e “hello\twarn” echo –e “hello\tcrit”

32 DEMO: real-time log file monitoring…
Time to get real… DEMO: real-time log file monitoring… …via NRPE? After all these mistakes…yet more demos?

33 Modules CheckLogFile Subscribes to filechanges SimpleCache
Store our result NRPEClient Accept remote checks (if there is time) NRPEServer NSCP CheckLogFile CACHE SimpleCache

34 Resulting config from DEMO
[/modules] CheckLogFile = enabled NSCAClient = enabled SimpleFileWriter = enabled SimleCache = enabled [/settings/logfile/real-time/checks/sample] critical = column2 like 'crit' destination = FILE,NSCA,CACHE file = ./test.txt filter = column1 like 'hello' warning = column2 like 'warn' [/settings/logfile/real-time] enabled = true [/settings/NSCA/client/targets/default] address = encryption = xor password = secret

35 Run the following ./nscp test echo –e “hello\tworld” echo –e “hello\twarn” echo –e “hello\tcrit” In nsclient console execute: check_cache index=sample

36 Photo by Olga Berrios Questions? Q&A

37 facebook.com/nsclient
Thank You! Michael Medin com/in/mickem Information about NSClient++ facebook.com/nsclient Slides, and examples The end!


Download ppt "NSClient++ in the new millenium!"

Similar presentations


Ads by Google