Monday, May 20th 2013, 5:37pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to Monitoring-Portal.
Although this is a german monitoring forum, please don't hesitate to post in English. Nearly everybody here understands you and will answer in English as well.
If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form to register here or read more information about the registration process. If you are already registered, please login here.

pole23

Beginner

Posts: 3

Number of monitoring servers: Nein

Nagios Version: 3

Distributed monitoring: Nein

Redundant monitoring: Nein

Number of hosts: 200

Number of services: 45

OS: Windows/Linux

Plugin Version: KA

1

Tuesday, August 7th 2012, 9:45am

Windows NRPE

Hallo zusammen,

ich habe seid einigen Tagen angefangen, ein Nagios System bei uns aufzubauen. Der Server liegt auf einem Debian6 und es werden div. ESXi und Linux Server erfolgreich damit überwacht.
Jetzt wollte ich auch so nach und nach unsere Windows Maschinen reinpacken, und zwar nrpe und nciht mit check_nt. Der Server ist ein WIndows 2008 x64 Server

Der Befehl:

./check_nrpe -H IP-des-Clients

ergibt auch:

...seem to be doing fine..

Somit scheint die Verbindung zu stehen. Jetzt wollte ich die Scripte testen, die bei dem 0.4 Client dabei sind, allerding klappt das nciht. Die Installation des Clients befindet sich im Ornder :C:\Program Files\NSClient++ und die Scripte im Ordner C:\Program Files\NSClient++\scripte.

hier ist meine nsclient.ini

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
; Undocumented section


[/modules]

; CheckDisk - CheckDisk can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
CheckDisk = 1

; Event log Checker. - Check for errors and warnings in the event log. This is only supported through NRPE so if you plan to use only NSClient this wont help you at all.
CheckEventLog = 1

; Check External Scripts - A simple wrapper to run external scripts and batch files.
CheckExternalScripts = 1

; Helper function - Various helper function to extend other checks. This is also only supported through NRPE.
CheckHelpers = 1

; Check NSCP - Checkes the state of the agent
CheckNSCP = 1

; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem = 1

; NRPE server - A simple server that listens for incoming NRPE connection and handles them. NRPE is preferred over NSClient as it is more flexible. You can of cource use both NSClient and NRPE.
NRPEServer = 1

; NSClient server - A simple server that listens for incoming NSClient (check_nt) connection and handles them. Although NRPE is the preferred method NSClient is fully supported and can be used for simplicity or for compatibility.
NSClientServer = 1


; Undocumented section
[/settings/default]

; ALLOWED HOSTS - A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts = 192.168.1.10

; PASSWORD - Password used to authenticate againast server
;password =


; Section for NRPE (NRPEListener.dll) (check_nrpe) protocol options.
[/settings/NRPE/server]
port=5666
allow_arguments=1
use_ssl=1

; Section for NSClient (NSClientServer.dll) (check_nt) protocol options.
[/settings/NSClient/server]
port=12489

; Section for system checks and system settings
[/settings/check/system/windows]


; Confiure which services has to be in which state
[/settings/check/system/windows/service mapping]


; Configure crash handling properties.
[/settings/crash]


; Section for the EventLog Checker (CheckEventLog.dll).
[/settings/eventlog]


; A set of options to configure the real time checks
[/settings/eventlog/real-time]


; A set of filters to use in real-time mode
[/settings/eventlog/real-time/filters]


; Section for external scripts configuration options (CheckExternalScripts).
[/settings/external scripts]


; A list of aliases available. An alias is an internal command that has been "wrapped" (to add arguments). Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
[/settings/external scripts/alias]


; A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
[/settings/external scripts/scripts]
nt_check_ping=c:\test\check_ping 192.168.1.137

; A list of wrappped scripts (ie. using the template mechanism)
[/settings/external scripts/wrapped scripts]


; A list of templates for wrapped scripts
[/settings/external scripts/wrappings]


; Section for configuring the log handling.
[/settings/log]


; Configure log file properties.
[/settings/log/file]


; Section for configuring the shared session.
[/settings/shared session]


Wenn ich den Befehl
"./check_nrpe -H IP-des-Clients -c nt_check_ping"
ausführen, erhalte ich die Antwort: "Das System kann die angegebene Datei nciht finden"

Wo müssen denn die Scripte hin? Wie definiere ich das?

Der Oest

Trainee

Posts: 83

Gender: male

Number of monitoring servers: 2

Nagios Version: 3.3.1

Distributed monitoring: Nein

Redundant monitoring: Nein

Number of hosts: 250

Number of services: 2000

OS: SLES 11 64-bit

Plugin Version: 1.4.15

NDO Version: 2

Other Addons: PNP 0.4.x

2

Tuesday, August 7th 2012, 9:49am

Quoted

nt_check_ping=c:\test\check_ping 192.168.1.137
Es gibt diese Datei check_ping - unter Windows und ohne Dateiendung?

Deep911

Trainee

Posts: 89

Birthday: Jan 20th 1979 (34)

Gender: male

Location: Bremen

Occupation: Fachinformatiker / Systemintegration

Number of monitoring servers: 10 (verteilt auf mehrere Kunden)

Hobbies: Fussball, Games, Mixing Minimal Electro

Nagios Version: Icinga 1.6.1 + 1.7.1

Icinga Version: 1.6.1, 1.7.1

Distributed monitoring: Ja

Redundant monitoring: Nein

Number of hosts: 800

Number of services: 2500

OS: Ubuntu 11.04, LTE 10.04,LTE 12.04

Plugin Version: Icinga-Web 1.6.1, Nconf 1.2.6, Nconf 1.3.0, PnP4nagios 0.6.16,PnP4nagios 0.6.18

NagVis Version: 1.6.4

Other Addons: Interfacetable_v3t, EventDB,Snmptt,Jasperserver 4.2.1

3

Tuesday, August 7th 2012, 9:58am

Hi,
die scripts liegen eingentlich unter C:\Programme\NSClient++\scripts und das script was du aufrufen möchtest lautet so : check_ping.bat.
Also fügst du beides am besten in der config zusammen und machst daraus:

Source code

1
2
3
; A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
[/settings/external scripts/scripts]
nt_check_ping=C:\Programme\NSClient++\scripts\check_ping.bat 192.168.1.137


Dann sollte es eigentlich funktionieren.
Computer dienen uns zur Lösung von Problemen, die wir ohne sie nicht hätten.

Music makes me happy! Deep911 in the mix on soundcloud !

pole23

Beginner

Posts: 3

Number of monitoring servers: Nein

Nagios Version: 3

Distributed monitoring: Nein

Redundant monitoring: Nein

Number of hosts: 200

Number of services: 45

OS: Windows/Linux

Plugin Version: KA

4

Tuesday, August 7th 2012, 10:41am

Oh man, wie peinlich.

also mit der Dateiendung klappt es.

Vielen dank für die schnelle Hilfe!!!