Hi
I have several apps running on a single server. Some of these use sidekiq. I am trying to monitor whether sidekiq is running for these apps.
I have the following LLD script configured
This correctly generates the following
{
"data":[
{"{#DIRNAME}":"app1"},
{"{#DIRNAME}":"app2"},
{"{#DIRNAME}":"app3"}]
}
Now each sidekiq process is called the same as the folder, so there is a process running called app1 (which is the sidekiq process for app1) etc.
On the client I have the following configured
UserParameter=folder.discovery[*],/etc/zabbix/scripts/sidekiq.sh
In Zabbix I have the following configured
Discovery Rule:
Name: Discover apps using sidekiq
Type: Zabbix agent
Key: folder.discovery
Item prototypes:-
Name: Check if sidekiq is running
Type: Zabbix agent
Key: proc.num[#DIRNAME,ubuntu,,]
However, i'm getting the following error:-
Cannot create item: item with the same key "proc.num[#DIRNAME,ubuntu,,]" already exists.
Cannot create item: item with the same key "proc.num[#DIRNAME,ubuntu,,]" already exists.
Cannot create item: item with the same key "proc.num[#DIRNAME,ubuntu,,]" already exists.
What am I doing wrong?
Thanks
I have several apps running on a single server. Some of these use sidekiq. I am trying to monitor whether sidekiq is running for these apps.
I have the following LLD script configured
Code:
#!/bin/bash
echo "{"
echo "\"data\":["
/usr/bin/find /home/ubuntu/*/current/config -name "sidekiq.yml"|awk -F"/" '{ print "{\"{#DIRNAME}\":\""$4"\"}," }' | head -c -2
echo "]"
echo "}"
{
"data":[
{"{#DIRNAME}":"app1"},
{"{#DIRNAME}":"app2"},
{"{#DIRNAME}":"app3"}]
}
Now each sidekiq process is called the same as the folder, so there is a process running called app1 (which is the sidekiq process for app1) etc.
On the client I have the following configured
UserParameter=folder.discovery[*],/etc/zabbix/scripts/sidekiq.sh
In Zabbix I have the following configured
Discovery Rule:
Name: Discover apps using sidekiq
Type: Zabbix agent
Key: folder.discovery
Item prototypes:-
Name: Check if sidekiq is running
Type: Zabbix agent
Key: proc.num[#DIRNAME,ubuntu,,]
However, i'm getting the following error:-
Cannot create item: item with the same key "proc.num[#DIRNAME,ubuntu,,]" already exists.
Cannot create item: item with the same key "proc.num[#DIRNAME,ubuntu,,]" already exists.
Cannot create item: item with the same key "proc.num[#DIRNAME,ubuntu,,]" already exists.
What am I doing wrong?
Thanks
Comment