SMS_AD_SYSTEM_DISCOVERY_AGENT.

c:\Program Files\Microsoft Configuration Manager\Logs\adsysdis.log
The string which we are interested looks something like:
ERROR: Machine COMPUTERNAME is offline or invalid..
To implement the rule at first you need to add cat, grep, sed, tail support to windows operating %path% variable. I usualy keep these all libraries in c:\gnu:

UserParameter object in C:\Program Files\Zabbix Agent\zabbix_agentd.conf
EnableRemoteCommands=1
UserParameter=MachineIsInvalid,if exist "C:\Program Files\Microsoft Configuration Manager\Logs\adsysdis.log" cat "C:\Program Files\Microsoft Configuration Manager\Logs\adsysdis.log" | grep -e "is offline or invalid" | sed "s/^.*Machine/Machine/g;s/invalid.*/invalid/g;s/\d039//g" | tail -1
Create new item in zabbix:Name:
MachineIsInvalidType:
Zabbix AgentKey:
MachineIsInvalidHost interface:
IP: 10050Type of information:
Text

Name:
{ITEM.LASTVALUE}Expression:
{computername:MachineIsInvalid.regexp(invalid)}=1

No comments:
Post a Comment