I defined template and discovery for my host Using custom parameters . when i define item prototype i am getting an error Cannot create item: item with the same key "sfa.disk_usage[{#SFANAME},40]" already exists. my custom userparameters are
# User parameter conf file
UserParameter = sfa.get_ctrl, cat /home/naveen/Documents/zabbix_fs
UserParameter = sfa.disk_usage[*], echo $2
#My Json for sfa.get_ctrl
{
"data":[
{
"{#SFANAME}":"\/",
"{#FSTYPE}":"rootfs"
},
{
"{#SFANAME}":"\/sys",
"{#FSTYPE}":"sysfs"
},
{
"{#SFANAME}":"\/proc",
"{#FSTYPE}":"proc"
},
{
"{#SFANAME}":"\/dev",
"{#FSTYPE}":"devtmpfs"
},
{
"{#SFANAME}":"\/dev\/pts",
"{#FSTYPE}":"devpts"
}
]
}
# My item Prototype details
Name: Free SFA space on $1
Type: Zabbix agent
Key: sfa.disk_usage[{#SFANAME},40]
Type: Numeric(unsigned)
Data Type: Decimal
# User parameter conf file
UserParameter = sfa.get_ctrl, cat /home/naveen/Documents/zabbix_fs
UserParameter = sfa.disk_usage[*], echo $2
#My Json for sfa.get_ctrl
{
"data":[
{
"{#SFANAME}":"\/",
"{#FSTYPE}":"rootfs"
},
{
"{#SFANAME}":"\/sys",
"{#FSTYPE}":"sysfs"
},
{
"{#SFANAME}":"\/proc",
"{#FSTYPE}":"proc"
},
{
"{#SFANAME}":"\/dev",
"{#FSTYPE}":"devtmpfs"
},
{
"{#SFANAME}":"\/dev\/pts",
"{#FSTYPE}":"devpts"
}
]
}
# My item Prototype details
Name: Free SFA space on $1
Type: Zabbix agent
Key: sfa.disk_usage[{#SFANAME},40]
Type: Numeric(unsigned)
Data Type: Decimal