Let's say, I have some applications:
And so far, I have been able to show the versions onto Zabbix by using a Powershell script:
Created an item:
Type: Zabbix Agent
Key: system.run["powershell.exe -NoProfile -ExecutionPolicy ByPass -File C:\zabbix\scripts\aaa_version.ps1"]
Runs perfect but very primitive.
As you can see in the table, Tom and Kenny have newer versions. How can I show through Zabbix that John and Jim have to update the software?
Do I make a JSON file where I maintain all the newest versions and if they don't match with the JSON, it should trigger?
| Name software | Version | Host |
| aaa.exe | v3.0 | John |
| aaa.exe | v4.5 | Tom |
| aaa.exe | v4.5 | Kenny |
| aa.exe | v3.0 | Jim |
Code:
$version = get-item 'D:\Programs\aaa\aaa.exe' | Select -ExpandProperty VersionInfo | Select FileVersion | ft - hidetableheaders
$aaa = (get-item 'D:\Programs\aaa\aaa.exe' | Select-Object "Name")
if ($aaa -Match "aaa.exe")
{echo $version}
else
{echo "Not found}
Type: Zabbix Agent
Key: system.run["powershell.exe -NoProfile -ExecutionPolicy ByPass -File C:\zabbix\scripts\aaa_version.ps1"]
Runs perfect but very primitive.
As you can see in the table, Tom and Kenny have newer versions. How can I show through Zabbix that John and Jim have to update the software?
Do I make a JSON file where I maintain all the newest versions and if they don't match with the JSON, it should trigger?

Comment