<command name="Geneos Command Email">
	<targets>
		<target>/geneos/gateway/directory/probe/managedEntity/sampler/dataview</target>
	</targets>
	<userCommand>
		<type>script</type>
		<runLocation>gateway</runLocation>
		<args>
			<arg>
				<static>/opt/itrs/gateway/geneos_command_email.sh</static>
			</arg>
			<arg>
				<xpath>/geneos/gateway/@name</xpath>
			</arg>
			<arg>
				<xpath>/geneos/gateway/directory/probe/@name</xpath>
			</arg>
			<arg>
				<xpath>ancestor::managedEntity</xpath>
			</arg>
			<arg>
				<xpath>ancestor::sampler</xpath>
			</arg>
			<arg>
				<xpath>ancestor::sampler/@type</xpath>
			</arg>
			<arg>
				<xpath>ancestor-or-self::dataview</xpath>
			</arg>
		</args>
		<environmentVariables>
			<variable>
				<name>GatePort</name>
				<value>
					<var ref="GatePort"/>
				</value>
			</variable>
		</environmentVariables>
	</userCommand>
</command>