Geneos has a built-in command called sampleNow which can be configured to restart a Toolkit sampler.
You can set up a schedule command:
Below is the xml of a scheduled command that runs the sampleNow command one time on all of the Toolkit samplers on the Gateway during the start and end period:
<scheduledCommand name="Toolkit-sampleNow">
<command>
<internalCommand>
<name>/PLUGIN:sampleNow</name>
</internalCommand>
</command>
<recurrence>
<pattern>
<days>
<everyWeekday></everyWeekday>
</days>
</pattern>
<range>
<start>2023-01-30T13:32:00</start>
<endBy>2023-01-30T14:00:00</endBy>
</range>
</recurrence>
<targets>
<target>/geneos/gateway[(@name="YourGatewayName")]/directory/probe/managedEntity/sampler[(param("PluginName")="TOOLKIT")]</target>
</targets>
</scheduledCommand>
The NetProbe Log file will indicate a sampleNow has been initiated.
2023-01-30 13:32:07.164-0500 INFO: SampleNow invoked from Gateway for netprobe_lsof_sh
The Gateway Log file will also log each executing sampleNow command.
2023-01-30 13:32:00.021-0500 INFO: RunningScheduledCommand Executing Scheduled Command 'Toolkit-sampleNow', writing to log file 'file://./Toolkit-sampleNow.20230130 -13.32.00.log'
2023-01-30 13:32:01.074-0500 INFO: CommandManager Executing command [/PLUGIN:sampleNow] with id [63] for request id [2]
2023-01-30 13:32:01.076-0500 INFO: CommandManager Executing command '/PLUGIN:sampleNow' on DataItem '/geneos/gateway[(@name="aws1_7039")]/directory/probe[(@name="AW S_Gwy_localhost-172-31-6-187")]/managedEntity[(@name="AWS_Gyw_localhost-172-31-6-187")]/sampler[(@name="Toolkit_1")][(@type="")]', issued on ''
2023-01-30 13:32:02.130-0500 INFO: CommandManager Executing command [/PLUGIN:sampleNow] with id [64] for request id [3]
Related Articles
Comments
0 comments
Please sign in to leave a comment.