×
Back to Geneos FAQ
How to use Extractor to monitor webpage content
There are times that client will ask for Extractor plugin example. The problem is that, we do not have common webpage to demonstrate this. This FAQ aims to address that issue by having a template that everyone can use. The licensing page is used as an example here since everyone including the client have access to this page.
Below is the xml files for web-mon and extractor.
Web-Mon sampler:
<sampler name="web license">
<plugin>
<web-mon>
<host>
<data>192.168.100.88</data>
</host>
<port>
<data>7041</data>
</port>
<protocol>
<http></http>
</protocol>
<scenarioList>
<scenario>
<name>License Monitoring</name>
<stages>
<stage>
<name>Home Page</name>
<url>
<data>/licensing</data>
</url>
<dataTransfer>
<name>
<data>NPLCe</data>
</name>
</dataTransfer>
</stage>
</stages>
</scenario>
</scenarioList>
</web-mon>
</plugin>
</sampler>
Extractor sampler:
<sampler name="extra license">
<plugin>
<extractor>
<source>
<samplerDataTransfer>
<name>
<data>NPLCe</data>
</name>
</samplerDataTransfer>
</source>
<views>
<view>
<name>
<data>NPLC</data>
</name>
<template>
<custom>
<format>
<html>
<method>
<xpath>
<xpath>/html/body/div/div[2]/table</xpath>
<headlines></headlines>
<columns>
<xpath>thead/tr</xpath>
<column>
<xpath>td</xpath>
<name>
<xpath>
<xpath>text()</xpath>
</xpath>
</name>
</column>
</columns>
<rows>
<xpath>tbody/tr</xpath>
<row>
<name></name>
<cells>
<cell>
<xpath>td</xpath>
<value>
<xpath>
<xpath>text()</xpath>
</xpath>
</value>
</cell>
</cells>
</row>
</rows>
</xpath>
</method>
</html>
</format>
</custom>
</template>
</view>
</views>
</extractor>
</plugin>
<debug>
<setting>*</setting>
</debug>
</sampler>
["Geneos"]
["Geneos > Netprobe"]
["FAQ"]