Good day Zabbix people!
Could I ask your assistance/help with understanding what could be causing cpu load from zabbix agent2.
OS - Ubuntu 22.04 LTS
Zabbix server version - 6.4.0
Zabbix agent2 version - 6.4.4
CPU load appears when I add to host template with discovery rule:
Discovery rule key:
Code:
system.run[find /folder/ \( -path '/xxx/xxx' -o -path '/yyy/yyyyyy' \) -prune -o -name '*.log' -print]
JavaScript:
Code:
var lld = [];
var lines = value.split("\n");
for (i = 0; i < lines.length; i++) {
lld.push({
"{#FILE}": lines[i],
"{#NAME}": lines[i].split("/").pop().split(".").slice(0,-1).join(".").toUpperCase()
});
}
return JSON.stringify(lld);
Code:
logrt[{#FILE},(?!.*errors text|.*skip_import_errors)^.*(ERROR|error|errors$),,,skip]
Code:
last(/xxx APP LOGS/logrt[{#FILE},(?!.*errors text|.*skip_import_errors)^.*(ERROR|error|errors$),,,skip])<>0
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Testing:
Launching discover rule system.run command finds the logs:
testing preprocessing script:
Logs are discovered, added to zabbix and triggers working, i just don't understand whats causing 100% load on cpu from zabbix-agent2.
What additional information i should provide to shed some light on this?