NSClient++ Installation in command line

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

NSClient++ Installation in command line

Post by bsivavani »

Hello all,

I got below commands to install NSClient++ in windows 7 and 8.

Win32:
msiexec /l* log.txt /i NSCP-0.4.0.169-win32.msi CONF_CAN_CHANGE="TRUE" ALLOWED_HOSTS="99.99.99.99" CONF_CHECKS="TRUE" CONF_NSCLIENT="TRUE" /quiet

Win64:
msiexec /l* log.txt /i NSCP-0.4.3.143-x64.msi CONF_CAN_CHANGE="TRUE" ALLOWED_HOSTS="99.99.99.99" NSCLIENT_PWD="" CONF_CHECKS="TRUE" CONF_NSCLIENT="TRUE" /quiet

Is there any way to deploy NSclient++ on multiple servers at a time from single server.

Thanks,
Vani
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NSClient++ Installation in command line

Post by tmcdonald »

This is more of a Windows question than a Nagios question, but there are a few technologies you can use:

https://technet.microsoft.com/en-us/lib ... 82082.aspx
https://support.microsoft.com/en-us/kb/816102
http://wpkg.org/Main_Page
Former Nagios employee
mopp
Posts: 64
Joined: Thu Aug 20, 2015 7:15 am

Re: NSClient++ Installation in command line

Post by mopp »

You can either use Powershell WinRM to run remote commands (Invoke-Command) or use tools like psexec from sysinternals to run remote commands.
This way you can just put your installation package on a share start then trigger the installation.
Here are some more ideas http://docs.nsclient.org/tutorial/core/ ... ely-manage

You can also modify the ini from command line, e. h.

Code: Select all

nscp settings --path /settings/NRPE/server --key "allowed hosts" --set 127.0.0.1
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NSClient++ Installation in command line

Post by lmiltchev »

bsivavani, did tmcdonald and mopp answer your question?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NSClient++ Installation in command line

Post by Box293 »

You should also check out Willem's "Nagios Automation Framework" for Nagios Reactor, it allows you to push out NSClient++.

http://outsideit.net/naf-windows-request-install/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: NSClient++ Installation in command line

Post by bsivavani »

Thanks for the update.

Is this necessary to install Nagios reactor.

We are able to install using below batch file in the same system.

@echo off
msiexec /i C:\Users\sivavani.basetty\Desktop\Nagios\NSCP-0.4.3.143-x64.msi /passive /norestart ADDLOCAL="ALL" REMOVE="Documentation" CONF_CHECKS="TRUE" CONF_NSCLIENT="TRUE" ALLOWED_HOSTS="192.168.152.130" ADD_DEFAULTS="ALL" CONF_CAN_CHANGE="TRUE" /L*V "example.log"
xcopy "C:\Users\sivavani.basetty\Desktop\Nagios\nsclient.ini" "C:\Program Files\NSClient++" /q
net stop nscp
net start nscp

We are searching for to install agent from remote system. Please let us know how to proceed on this.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NSClient++ Installation in command line

Post by tmcdonald »

Remote install options have been listed in previous posts. Please check out the links and advice given by myself and others, and let us know if that will work for you. Unfortunately we can't help too much with the distribution/automation since that's not a problem specific to Nagios.
Former Nagios employee
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NSClient++ Installation in command line

Post by Box293 »

bsivavani wrote:Thanks for the update.

Is this necessary to install Nagios reactor.

We are able to install using below batch file in the same system.

@echo off
msiexec /i C:\Users\sivavani.basetty\Desktop\Nagios\NSCP-0.4.3.143-x64.msi /passive /norestart ADDLOCAL="ALL" REMOVE="Documentation" CONF_CHECKS="TRUE" CONF_NSCLIENT="TRUE" ALLOWED_HOSTS="192.168.152.130" ADD_DEFAULTS="ALL" CONF_CAN_CHANGE="TRUE" /L*V "example.log"
xcopy "C:\Users\sivavani.basetty\Desktop\Nagios\nsclient.ini" "C:\Program Files\NSClient++" /q
net stop nscp
net start nscp

We are searching for to install agent from remote system. Please let us know how to proceed on this.
Thats similar to how I used to do it at my last environment.

You need to deploy a Reactor server to take advantage of Willem's method. While this may seem like more work, it does work well for other things such as updating NSClient++ configs as well.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NSClient++ Installation in command line

Post by WillemDH »

And you can do many more stuff with Reactor and link that to Nagios quick actions (for example)
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NSClient++ Installation in command line

Post by lmiltchev »

Thanks WillemDH!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked