NRDP via NSClient++


#1

Hello,
I’m trying to set up NRDP for NSClient. I found info about nrdp module at NSClient manual. Also I found NRDPClient.dll file at NSClient++ folder. But I havent’t found any info about how to make it work:).
I think a sample of command for nscp.exe might help me. I have no idea how to start.
NSClent++ 0.4.3.131


#2

I might misunderstood NRDPClient. Is anybody know can I use NRDPClient to send check result to NRDP server by web or not?
I’ve noticed in docs that client uses SMTP. Don’t know how it might be connected with NRDP web server.


#3

Ok, after several hours searching on the web I feel I should use command nrdp_submit. This command is available at nscp.exe test. But when I try to run it I get error:
UNKNOWN: Paradigm shift currently not supported
My sample of nrdp_submit is:
nrdp_submit address=host:8080/nrdp token=my_secret_token result=OK message=test


#4

Seems there’s a nrdp_submit bug in modern NSClient++ builds. I’ve tried three builds and got different results with the same nsclient.ini
NSCP-0.4.1.102-x64 - nrdp_submit works
NSCP-0.4.2.88-x64 - nrdp_submit doesn’t work (Paradigm shift currently not supported)
NSCP-0.4.2.114-x64 - nrdp_submit doesn’t work (Paradigm shift currently not supported)
NSCP-0.4.3.131-x64 - nrdp_submit doesn’t work (Paradigm shift currently not supported)

I’ve tested on Win Server 2008R2 and 2012 and got the same result.


#5

Depends on what you want to do. NRPE should work in conjunction with the scheduler i.e. passive monitoring. Not sure about the command lines they usually work for active monitoring such as check_nrpe.

So set it up much like you do NSCA and it should work.


#6

Can anybody give some better info on setup of NRDP? I am also looking to set this up. We were about to set up NSCA, but NRDP is supposed to be the updated version and is enabled by default in Nagios XI, so we would prefer to use NRDP, however the process to set it up is lacking.

Please, can we get a better guide on setup of these passive checks on both the NSClient++ as well as the Nagios Server? How do we define what exactly is checked and submitted (which hard drives etc. etc.)


#7

All, I’m very interested to see how you need to configure the nrdp_submit section in the ini file. (using 04.1.102 release) If somebody could help me with this, I would be very happy.

My goal would be to have passive monitoring in place and use nrdp to submit the results back to a nrdp server with nagios backend.

Thanks in advance.


#8

I’m not sure that it helps. I haven’t tested the whole automatic cycle report. All that I got is successful nrdp_submit execution from nscp.exe test. My NRDP config is the below.

NRDPClient = 1

; Target definition for: default
[/settings/NRDP/client/targets/default]

; TARGET ADDRESS - Target host address
host = server-address.com
port = 8080

; RECIPIENT - Recipient of email message
recipient = [email protected]

; SENDER - Sender of email message
sender = [email protected]

; TEMPLATE - Template for message data
template = Hello, this is %source% reporting %message%!

; TIMEOUT - Timeout when reading/writing packets to/from sockets.
timeout = 30

And that’s the log from cmd:

l ce\simple_client.hpp:32   Enter command to inject or exit to terminate...
nrdp_submit
d rvice\NSClient++.cpp:960  Injecting: nrdp_submit...
d lient\NRDPClient.cpp:326  Connection details: host: server-address.com, port: 8080, timeout: 30, token: , sender: eva-manager
d lient\NRDPClient.cpp:335  <?xml version="1.0" encoding="UTF-8"?>
<checkresults>
    <checkresult type="service">
        <hostname>eva-manager</hostname>
        <servicename></servicename>
        <state>3</state>
        <output></output>
    </checkresult>
</checkresults>

d lient\NRDPClient.cpp:336  XMLDATA=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Ccheckresults%3E%0A++
++%3Ccheckresult+type%3D%22service%22%3E%0A++++++++%3Chostname%3Eeva-manager%3C%2Fhostname%3E%0A++++++++%3Cservicename%3
E%3C%2Fservicename%3E%0A++++++++%3Cstate%3E3%3C%2Fstate%3E%0A++++++++%3Coutput%3E%3C%2Foutput%3E%0A++++%3C%2Fcheckresult
%3E%0A%3C%2Fcheckresults%3E%0A&cmd=submitcheck&token=
e lient\NRDPClient.cpp:341  Socket error: No connection could be made because the target machine actively refused it
d rvice\NSClient++.cpp:985  Result nrdp_submit: WARNING
l ce\simple_client.hpp:80   WARNING:Socket error: No connection could be made because the target machine actively refuse
d it

#9

hi and thanks for your reply,

I’m currently at the same point where I’m able to inject the nrdp_submit, however without calling a command. What i’m actually looking for is to see how the configuration has to be made so that it sends the results based on the scheduler automatically. For NSCA this was working, but I’m now trying to get it operational to send to a NRDP server.

[/settings/scheduler/schedules/default]

interval=15m

[/settings/scheduler/schedules]

check_win_filesystem=check_win_filesystem

[/settings/external scripts/scripts]

check_win_filesystem=C:\scripts\checkWINFS.exe

[/settings/NRDP/client]

hostname=TESTMONITOREDSYSTEM

[/settings/RDP/client/targets/default]

host=192.168.56.2

port=443

timeout=30

Below the log:

d vice\logger_impl.cpp:420  Creating logger: console d rvice\NSClient++.cpp:386  NSClient++ 0,4,1,102 2013-07-15 w32 Loading

settings and logger… d ngs_manager_impl.cpp:170 No entries found

looking in (adding default): C:/nrpe//boot.ini d ngs_manager_impl.cpp:178 Boot order: old://${exe-path}/nsc.ini, ini://${share d-path}/nsclient.ini d ngs_manager_impl.cpp:181 Activating: ini://${shared-path}/nsclient.ini d ngs_manager_impl.cpp:73 Creating instance for: ini://${shared-path}/nsclient .ini d mpl/settings_ini.hpp:303 Reading INI settings from: C:/nrpe//nsclient.in i d mpl/settings_ini.hpp:253 Loading: C:/nrpe//nsclient.ini d rvice\NSClient++.cpp:397 NSClient++ 0,4,1,102 2013-07-15 w32 booting… d rvice\NSClient++.cpp:398 Booted settings subsystem… d rvice\NSClient++.cpp:544 booting::loading plugins d rvice\NSClient++.cpp:306 Found: CheckExternalScripts d rvice\NSClient++.cpp:306 Found: NRDPClient d rvice\NSClient++.cpp:306 Found: Scheduler d rvice\NSClient++.cpp:867 addPlugin(C:/nrpe//modules/CheckExternalScripts .dll as ) d rvice\NSClient++.cpp:867 addPlugin(C:/nrpe//modules/NRDPClient.dll as ) d rvice\NSClient++.cpp:867 addPlugin(C:/nrpe//modules/Scheduler.dll as ) d rvice\NSClient++.cpp:844 Loading plugin: Check External Scripts d kExternalScripts.cpp:99 No wrappings found (adding default: vbs, ps1 and bat ) d kExternalScripts.cpp:109 No aliases found (adding default) d rvice\NSClient++.cpp:844 Loading plugin: NRDPClient d rvice\NSClient++.cpp:844 Loading plugin: Scheduler d eduler\Scheduler.cpp:64 Adding scheduled item: check_win_filesystem_all[0] = {alias: check_win_filesystem, command:check_win_filesystem channel: NSCA, target_id: , duration: 900} d eduler\Scheduler.cpp:64 Adding scheduled item: check_win_filesystem_c[0] = { alias: check_win_filesystem_c, command: check_win_filesystem_c, channel: NSCA, t arget_id: , duration: 900} d eduler\Scheduler.cpp:79 Thread count: 5 d rvice\NSClient++.cpp:616 NSClient++ - 0,4,1,102 2013-07-15 Started! l ce\simple_client.hpp:32
Enter command to inject or exit to terminate… d rvice\NSClient++.cpp:960 Injecting: check_win_filesystem_all… d kExternalScripts.cpp:249 Command line: C:\scripts\checkWINFS.exe nr pe d rvice\NSClient++.cpp:985 Result check_win_filesystem_all: OK e rvice\NSClient++.cpp:1264 No one listens for events from: NSCA (NSCA)

It keeps giving the message:

d rvice\NSClient++.cpp:985 Result check_win_filesystem_all: OK

e rvice\NSClient++.cpp:1264 No one listens for events from: NSCA (NSCA)

So it seems that the check itself is executed but not routed to the nrdpclient.


#10

I’m looking for the same thing Richard. I hope someone can respond.


#11

I never was able to find info on doing passive checks via NSClient++, however, i was able to get it to work with another free Nagios tool called NRDS. As part of the installation of this tool, it automatically creates a windows scheduled task to run at the interval you choose. https://assets.nagios.com/downloads/nagiosxi/docs/Passive_Monitoring_with_NRDS.pdf - check out the link at the bottom for the video tutorial - very helpful and walks through the whole process.

We also needed a method of setting up the Nagios XI Server to alert if a server had not submitted any results after a certain amount of time, so this document gives instructions on setting the “freshness” checks: https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/freshness.html - Basically, after you have set up the Services that gather the passively submitted results, you change the “Check command” to “check_dummy” and set ARG1 to “2 “whatever error message you want””. then on the alert tab, turn on “Passive Checks enabled” and “Check freshness”, then set your freshness threshold (the # of seconds to wait from the last passive result received before running the dummy command for the alert).

Hopefully this helps somebody else!


#12

I got it to work and here is the key:

  1. Use latest version, I needed to use 0.5.1.29

  2. In nsclient.ini

[/settings/NRDP/client/targets/default]

Define the address like so:

address = https://10.25.5.13/nrdp/ token = LIqdtq0Y7fPU

[/settings/scheduler/schedules/default]

Define the Channel to use NRDP:

channel = NRDP

The following documentation explains it clearly: