-
New Feature Request
-
Resolution: Duplicate
-
Major
-
None
-
None
-
None
Web applications often provide monitoring information via HTTP.
For example, if you call https://user:[email protected]/admin/monitoring.jsp you get key/value pairs like this:
—
app.sessions.active = 12
app.cached.elements = 2000
app.status.productload = OK (5124 products)
app.status.pricetable = FAIL
—
Currently you have to write a script which is called by a item to parse the resulting page and add the value to zabbix.
It would be very helpful to have a zabbix-internal item-parameter which does this job - for example:
Definition:
web.page.parse.regexp[<hostname>,<path>,<port>,<protocol>,<regex>,<length>]
host - hostname (if empty, use default)
path - path to HTML document (default is /)
port - port number (default is 80)
protocol - http or https
regexp - GNU regular expression
length - maximum number of characters to return
Return value:
The matched string, if a regex group is specified the the content of the first group will be returned.
Examples:
web.page.parse.regexp[www.foo.bar,/monitor.jsp,80,http,app.status.productload = (..*) : \d+ products,4]
=> line: app.status.productload = OK (5124 products)
=> zabbix value: OK
web.page.parse.regexp[www.foo.bar,/monitor.jsp,80,http,app.status.pricetable = (..*),12]
=> line: app.status.pricetable = FAIL
=> zabbix value: FAIL
I think that
web.page.regexp[host,<path>,<port>,<regexp>,<length>]
is pretty close to this...
Regards
Marc
- duplicates
-
ZBXNEXT-1653 Add an agent item to extract matching part of regular expression from specified file
- Closed