Netprobe - How to use RMS commands to upgrade Linux Probes
You can use a sequential set of RMS commands to perform the process of upgrading a Linux Netprobe and execute it all in one go.
Add the following XML as a new command on your gateway:
<command name="Linux NetProbe Upgrade">
<targets>
<target>/geneos/gateway/directory/probe[wild(rparam("OS"),"Linux*")]</target>
<target>/geneos/gateway/directory/probe[wild(rparam("OS"),"Linux*")]/managedEntity</target>
</targets>
<task>
<commands>
<commandRef>
<internalCommand>
<name>/RMS:putFile</name>
</internalCommand>
<stopOnError>true</stopOnError>
</commandRef>
<commandRef>
<internalCommand>
<name>/RMS:exec</name>
</internalCommand>
<stopOnError>true</stopOnError>
</commandRef>
<commandRef>
<internalCommand>
<name>/RMS:restart</name>
</internalCommand>
<stopOnError>true</stopOnError>
</commandRef>
</commands>
<args>
<arg>
<!--Gateway directory containing latest Netprobe binary-->
<targetArgs>
<targetArg>
<commandNumber>1</commandNumber>
<argNumber>1</argNumber>
</targetArg>
</targetArgs>
<static>/data/Binaries/Netprobe/Linux/netprobe.linux.latest.tar.gz</static>
</arg>
<arg>
<!--location on netprobe host (will default to netprobe working directory)-->
<targetArgs>
<targetArg>
<commandNumber>1</commandNumber>
<argNumber>2</argNumber>
</targetArg>
</targetArgs>
<static>netprobe.linux.latest.tar.gz</static>
</arg>
<arg>
<targetArgs>
<targetArg>
<commandNumber>2</commandNumber>
<argNumber>1</argNumber>
</targetArg>
</targetArgs>
<static>tar xzvf netprobe.linux.latest.tar.gz -C ../</static>
</arg>
</args>
</task> </command>
To explain the RMS commands sequence for this “Upgrade” command: Geneos - Netprobe - How to use RMS commands to upgrade Linux Probes
-
Command 1 executes the RMS putFile which aims to transfer the binary from the gateway server to the netprobe server.
-
Argument 1 here is the directory on the gateway server, and Argument 2 is on the Netprobe server (the destination). The file/directory permissions should reflect the user of the process on that server (1 is gateway, 2 is netprobe). - Command 2 is executing the tar command and extracting the contents of the tarball deployed by Command 1. This sequence runs on the Netprobe server already. - Command 3 is an internal Geneos process that instructs the Netprobe to restart after the underlying files have been updated.
Once available, you can execute the command by right clicking on the probe or managed entity icon and selecting the command: Geneos - Netprobe - How to use RMS commands to upgrade Linux Probes