Hi Everyone,
I am trying to fetch windows process metrics and facing some difficulties.
To begin with i created a new template, added a discovery rule and named the key win.process.metrics
Then i created 2 item prototype with following key.
Type Zabbix Agent(Active): win.process.metrics[{#PID}]
Type Dependent Item: win.process.metrics[{#PROCESSNAME}]
I created 2 LLD macros for the same
{#PROCESSNAME} = $.ProcessName
{#PID}=$.Id
Then i created userparameter in zabbixAgent conf file
UserParameter=metric.process.discovery,powershell -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Zabbix Agent\scripts\ProcessMetrics.ps1"
Content of the PowerShell script
Get-Process | Select ProcessName, Id, Description | ConvertTo-Json -Compress
Here is the sample result
[
{"ProcessName":"chrome","Id":1232,"Description" :"G oogle Chrome"},
{"ProcessName":"chrome","Id":1500,"Description" :"G oogle Chrome"}
]
When I enable the item prototype, i see that data is ingesting however for PID process i see "item does allow parameters" error [screenshot attached]
I would like to know how can i ingest multiple key value pair using one discovery rule. Is it possible in first place?
Appreciate your guidance in resolving this issue.
I am trying to fetch windows process metrics and facing some difficulties.
To begin with i created a new template, added a discovery rule and named the key win.process.metrics
Then i created 2 item prototype with following key.
Type Zabbix Agent(Active): win.process.metrics[{#PID}]
Type Dependent Item: win.process.metrics[{#PROCESSNAME}]
I created 2 LLD macros for the same
{#PROCESSNAME} = $.ProcessName
{#PID}=$.Id
Then i created userparameter in zabbixAgent conf file
UserParameter=metric.process.discovery,powershell -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Zabbix Agent\scripts\ProcessMetrics.ps1"
Content of the PowerShell script
Get-Process | Select ProcessName, Id, Description | ConvertTo-Json -Compress
Here is the sample result
[
{"ProcessName":"chrome","Id":1232,"Description" :"G oogle Chrome"},
{"ProcessName":"chrome","Id":1500,"Description" :"G oogle Chrome"}
]
When I enable the item prototype, i see that data is ingesting however for PID process i see "item does allow parameters" error [screenshot attached]
I would like to know how can i ingest multiple key value pair using one discovery rule. Is it possible in first place?
Appreciate your guidance in resolving this issue.