Deploy Scripts via http


#1

HI Michael, 2 weeks ago you told me, that it is possible to deploy scripts from a http server within Attachments.

is there a Documentation available? or can you create a short howto …

thx Dominik


#2

Nothing apart from I guess the usual changelog… can probably write some up though…

Just saw that the even the changelog is a bit vauge: https://github.com/mickem/nscp/blob/master/changelog#L566


#3

IN essence something along the lines of:

[/attachments]
scripts/foo.bat=http://myserver.vom/foo.bat

But the keyword here is along the lines of havent looked at this in ages…


#4

Hi Michael,

with nscp test

nsclient.ini:

[/attachments]
scripts/process_runtime.vbs=http://Icinga2/icingaweb2/TA/scripts/process_runtime.vbs

output:

debug:c:\source\master\include\settings/impl/settings_http.hpp:111: Found attachment: http://Icinga2/icingaweb2/TA/scripts/process_runtime.vbs as scripts/process_runtime.vbs
debug:c:\source\master\include\settings/impl/settings_http.hpp:91: File has changed: scripts/process_runtime.vbs

it works

but a simple Service restart leads to

error:c:\source\master\libs\settings_manager\settings_manager_impl.cpp:166: Failed to activate: 
error:c:\source\master\libs\settings_manager\settings_manager_impl.cpp:246: FATAL ERROR IN SETTINGS SUBSYTEM
error:c:\source\master\service\NSClient++.cpp:433: Settings exception when loading modules: Failed initialize settings instance
error:c:\source\master\include\service/win32_service.hpp:202: Unknown service error!

what iam doing wrong ?

thx regards Dominik


#5

This will be fixed in the next build


#6

Hi Michael, Version 0.5.0.62 deploy scripts works but on some scripts the file formal gets lost. i fixed it with “” :set fileformat=unix in vi

also i try to deploy .exe files these executable dosn’t work after the download. the exe file works when i download it via Explorer so iam stuck can you please check

regards Dominik


#7

Hello all, I using version 0.5.62 and I have the following in my NSClient++ config file:

[/attachments]
scripts/epr-service-check.ps1 http://centreon-server/centreon/scripts/epr-service-check.ps1

However when I check the scripts/ folder on the clients, the ‘epr-service-check.ps1’ file has not downloaded to the them; I’ve tried restarting the NSClient++ service but it doesn’t make any difference - can anyone help?