rrg92 / power-zabbix

Powershell module with lot of cmdlets that implements ZABBIX API, extra and auxiliary cmdlets
4 stars 2 forks source link

Delete-ZabbixItem -ZabbixItem #5

Open SCH48 opened 4 years ago

SCH48 commented 4 years ago

Hi, @rrg92 !

Trying to delete empty Items with "Delete-ZabbixItem"

$ItemsLike = Get-ZabbixItem -Hosts $Printers | ?{$_.key_ -like "prt*"} image

Delete-ZabbixItem -ZabbixItem "30564"

Does not work and no errors.

From example in Zabbix documentation item.delete

$params.body = @{
        "jsonrpc"= "2.0"
        "method" = "item.delete"
        "params"= @{
            "itemid" = "30564"
         }

Successfully deleted image

Best Regards, @SCH48

rrg92 commented 2 years ago

Hi @SCH48 , thanks. I will review the code and do some testing. Sorry for delay. Last years I do not worked with zabbbix more and this project go to my backlog.