I am using 7.0 forgot to mention that.
I am using zabbix_sender to send a text item that looks like this: customer-1, customer is the name of the customer and the 1 is the error number.
I created an item that is a zabbix Trapper named: CustomerLogError
The key field is named customerID-errorID
I created 2 other items they are both dependent on CustomerLogError.
The first one is named CustomerLogError: CustomerLogErrorID it is a dependent item
with Key value of CustomerLogError.ID it has a preprocessing regular expresssion of ^[^-]*-(.*)$ \1
which grabs the “1” off of the data sent via zabbix_sender.
The second one is named CustomerLogError: CustomerLogName it is a dependent item
with the Key value of CustomerLog.name it has a preprocessing regular expresssion of ^(.*)-.*$ \1
which grabs the “customer” off of the data sent via zabbix_sender.
There are two triggers setup which use the CustomerLogError.ID to evaluate which error occurred.
last(/PRDLOGSVR1/CustomerLogError.ID)=1
and
last(/PRDLOGSVR1/CustomerLogError.ID)=2
I have a trigger action setup which is setup like this:
Action
Name: CustomerLogAction
Type of calculation: Custom expression (A or B)
Conditions:
Label Name Action
A Trigger equals PRDLOGSVR1: CustomerConnectionLeakTrigger Remove
B Trigger equals PRDLOGSVR1: CustomerPrimaryKeyTrigger Remove
Add
Enabled
The Operation is set to send an email, no matter what I have tried I can not get CustomerLog.name
to display in the email, as you can see below I tried multiple ways, it doesn’t display the customer name, it just puts the syntax of the macro in the email
Problem started at {EVENT.TIME} on {EVENT.DATE}
Problem name: {TRIGGER.NAME}
Host: {HOST.NAME}
Severity: {TRIGGER.SEVERITY}
Item: {ITEM.NAME}
Current Value: {ITEM.VALUE}
Description: {TRIGGER.DESCRIPTION}
Event Details:
- Trigger Expression: {TRIGGER.EXPRESSION}
- Event ID: {EVENT.ID}
- Original Problem ID: {EVENT.ID}
Additional Information:
- Operational Data: {ITEM.VALUE1}Log into PRDLOGSVR1 and review the log. It will be in this folder E:\ProductionAppServerLogs\{HOST.HOST}:CustomerLog .name.last()-connection-leaks-as-of-{EVENT.DATE}
{{HOST.HOST}:CustomerLog.name.last()}-connection-leaks-as-of-{EVENT.DATE}
Custom Log Name: {{PRDLOGSVR1:CustomerLog.key}}
{servername:top.last(0)} {PRDLOGSVR1::CustomerLogName.last()}
{HOST.TAG} {HOST.INVENTORY.VENDOR}
{$CUSTOMER_LOG_NAME}
I am using zabbix_sender to send a text item that looks like this: customer-1, customer is the name of the customer and the 1 is the error number.
I created an item that is a zabbix Trapper named: CustomerLogError
The key field is named customerID-errorID
I created 2 other items they are both dependent on CustomerLogError.
The first one is named CustomerLogError: CustomerLogErrorID it is a dependent item
with Key value of CustomerLogError.ID it has a preprocessing regular expresssion of ^[^-]*-(.*)$ \1
which grabs the “1” off of the data sent via zabbix_sender.
The second one is named CustomerLogError: CustomerLogName it is a dependent item
with the Key value of CustomerLog.name it has a preprocessing regular expresssion of ^(.*)-.*$ \1
which grabs the “customer” off of the data sent via zabbix_sender.
There are two triggers setup which use the CustomerLogError.ID to evaluate which error occurred.
last(/PRDLOGSVR1/CustomerLogError.ID)=1
and
last(/PRDLOGSVR1/CustomerLogError.ID)=2
I have a trigger action setup which is setup like this:
Action
Name: CustomerLogAction
Type of calculation: Custom expression (A or B)
Conditions:
Label Name Action
A Trigger equals PRDLOGSVR1: CustomerConnectionLeakTrigger Remove
B Trigger equals PRDLOGSVR1: CustomerPrimaryKeyTrigger Remove
Add
Enabled
The Operation is set to send an email, no matter what I have tried I can not get CustomerLog.name
to display in the email, as you can see below I tried multiple ways, it doesn’t display the customer name, it just puts the syntax of the macro in the email
Problem started at {EVENT.TIME} on {EVENT.DATE}
Problem name: {TRIGGER.NAME}
Host: {HOST.NAME}
Severity: {TRIGGER.SEVERITY}
Item: {ITEM.NAME}
Current Value: {ITEM.VALUE}
Description: {TRIGGER.DESCRIPTION}
Event Details:
- Trigger Expression: {TRIGGER.EXPRESSION}
- Event ID: {EVENT.ID}
- Original Problem ID: {EVENT.ID}
Additional Information:
- Operational Data: {ITEM.VALUE1}Log into PRDLOGSVR1 and review the log. It will be in this folder E:\ProductionAppServerLogs\{HOST.HOST}:CustomerLog .name.last()-connection-leaks-as-of-{EVENT.DATE}
{{HOST.HOST}:CustomerLog.name.last()}-connection-leaks-as-of-{EVENT.DATE}
Custom Log Name: {{PRDLOGSVR1:CustomerLog.key}}
{servername:top.last(0)} {PRDLOGSVR1::CustomerLogName.last()}
{HOST.TAG} {HOST.INVENTORY.VENDOR}
{$CUSTOMER_LOG_NAME}
reservesUnits($function) ? $item['units'] : '';
Comment