Hi,
I need to extract from a server I am monitoring about 20 items data.
The items can be all fetched using a single call, which is expensive.
The data is stored into the output like this:
item1: value1 (numeric)
item2: value2 (numeric)
item3: value3 (numeric)
.................
item20: value20 (numeric)
Currently I have one UserParameter which allows me to extract every item with a call:
UserParameter=app.status[*],/path-to-app/status | awk '/^$1/{$$1="";gsub(/^[ \t]+/, "");print}'
Obviously this means I will have 20 - costly - calls to the app... Which is not good at all...
I need to find out a way to only call the app one time and then extract (grep/awk) the items from the "base item".
I think I have 2 solutions:
1. Zabbix agent is fetching the entire app status output, which is stored within an item (Text) and on Zabbix server I use Calculated items for rest 20. There is however an issue. I can't find something to help me grep/awk the numerically values from the "base item". The functions which can be used on a Calculated item seems to be very limited:
2. Zabbix agent is fetching the entire app status output, which is stored within an item (Text) and on Zabbix server. Then I use 20 External check items to extract the amounts for them from base item. Here is another issue. I need to pass to external script the value of "base item".
However, as far as I tested I can't find how to pass item app.status value to external script:
app_status.sh["paramtoget","{last(app.status)}"]
or
app_status.sh["paramtoget",{last(app.status)}]
or
app_status.sh["paramtoget",last(app.status)]
Doesn't work as seems it's not passing the last app.status item value
3. At least for now I am trying to avoid using trappers.
Anyone has any idea how to either fix one of above issues or any other idea how to solve the problem?
I need to extract from a server I am monitoring about 20 items data.
The items can be all fetched using a single call, which is expensive.
The data is stored into the output like this:
item1: value1 (numeric)
item2: value2 (numeric)
item3: value3 (numeric)
.................
item20: value20 (numeric)
Currently I have one UserParameter which allows me to extract every item with a call:
UserParameter=app.status[*],/path-to-app/status | awk '/^$1/{$$1="";gsub(/^[ \t]+/, "");print}'
Obviously this means I will have 20 - costly - calls to the app... Which is not good at all...
I need to find out a way to only call the app one time and then extract (grep/awk) the items from the "base item".
I think I have 2 solutions:
1. Zabbix agent is fetching the entire app status output, which is stored within an item (Text) and on Zabbix server I use Calculated items for rest 20. There is however an issue. I can't find something to help me grep/awk the numerically values from the "base item". The functions which can be used on a Calculated item seems to be very limited:
2. Zabbix agent is fetching the entire app status output, which is stored within an item (Text) and on Zabbix server. Then I use 20 External check items to extract the amounts for them from base item. Here is another issue. I need to pass to external script the value of "base item".
However, as far as I tested I can't find how to pass item app.status value to external script:
app_status.sh["paramtoget","{last(app.status)}"]
or
app_status.sh["paramtoget",{last(app.status)}]
or
app_status.sh["paramtoget",last(app.status)]
Doesn't work as seems it's not passing the last app.status item value
3. At least for now I am trying to avoid using trappers.
Anyone has any idea how to either fix one of above issues or any other idea how to solve the problem?
Comment