corvax
corvax

Reputation: 1145

How to create graph from log item in zabbix?

Say I have log item which collects following logs:

[2014-09-01 23:11:34] [message handled] 23s
[2014-09-01 23:16:27] [message handled] 41s
...

I want to create graph with information about message processing duration.

I can create calculated item from log item,

but how to convert [message handled] 23s to 23, cause regex return only 1 or 0?

Upvotes: 1

Views: 2641

Answers (1)

asaveljevs
asaveljevs

Reputation: 2250

One way would be to create another log[] item which extracts "23" from "[message handled] 23s" using its regular expression (see item documentation). At this point, however, you will hit ZBX-7821, which says that one cannot set log[] item type to numeric. However, you can proceed by creating a calculated item as you already do that simply returns last("log[...]") and graph that instead.

Upvotes: 2

Related Questions