There are a few XPaths available to capture info of the Active Console, they are: - /geneos/client/parameters/@HostName
- /geneos/client/runtimeParameters/@Username (Username only without domain name)
- /geneos/client/runtimeParameters/@Domain (Domain name)
As an example, below is a Putty command using the username to connect to a Unix server: <command name="GW2_Putty_with_username">
<targets>
<target>/geneos/gateway/directory/probe[wild(rparam("OS"),"Linux*")]/managedEntity[wild(@name,"nysupsvr*")]</target>
<target>/geneos/gateway/directory/probe[wild(rparam("OS"),"S*")]/managedEntity</target>
</targets>
<userCommand>
<type>script</type>
<runLocation>client</runLocation>
<args>
<arg>
<static>"C:\Program Files\PuTTY\putty.exe"</static>
</arg>
<arg>
<xpath>ancestor::probe/parameters/@HostName</xpath>
</arg>
<arg>
<static>-l</static>
</arg>
<arg>
<xpath>/geneos/client/runtimeParameters/@Username</xpath>
</arg>
</args>
</userCommand>
</command>
|
Comments
0 comments
Please sign in to leave a comment.