File copy to agent
-
Hello,
I have a some powershell scripts which i use on windows agents by the ExternalParameter or ExternalList-options. This works quite well, but currently I copy these scripts manually to the agents data folder.
Is it possible that that agent automatically loads additional files in its data folder? I guess the configuration poll hook would be a good place for such an "action", but I can't find any info how to upload or download a file to the agent by NXSL.
Or is there even a simpler method to copy files from server to agent for some library files?Regards,
Ben -
Hi,
currently there is no option to relate scripts to DCIs or templates and copy them automatically. You can simplify your task a bit by using mass file upload (upload file to server, then select container and choose "upload file" - it will upload selected server file to all agents in container). We have plans for simplifying related files distribution, but I cannot tell now in what release it will be.
Best regards,
Victor -
Thanks for your answer, Victor.
Is there a NXSL function to upload files to an agent? I thought I read something some time ago but I can't find it anymore... -
There is no NXSL function for that. You can use nxupload command line tool or nxshell( https://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations ) to automate file upload. You can generate Event from hook and on event execute action(runn server command), that executes nxupload or nxshell commands.
-
Thanks for your reply. I haven't found time yet but I will definitivly test that.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login