P
P
proteus862015-02-13 15:23:55
Zabbix
proteus86, 2015-02-13 15:23:55

Zabbix. Windows process monitoring?

There is a user parameter UserParameter=TMServer,tasklist /fi "status eq not responding" /nh
On the local machine (in the cmd line) it correctly issues
example.exe 6448 Console 2 6 616 KB
In the agent logs we see
4256:20150213:161917.947 EXECUTE_STR() command :'tasklist /fi "status eq not responding" /nh' len:63 cmd_result:'ȭ䯠̠橯: ǠĠ稬 '
4256:20150213:161917.947 Ϣ⤢⢢䯢.]
Hidden in these crocs is the text
Info: There are no tasks matching the given criteria.
What's the matter do not tell me? Why does the agent process the request incorrectly?
Perhaps he does not understand " and therefore does not work correctly?
So how does the tasklist request from the agent return everything correctly?
Is it possible to specify the encoding?
Again, the request UserParameter=TIME_WAIT_tcp,netstat -o -n -a -t | find /c "TIME_WAIT"
works fine.
So the issue with the crocuses is resolved))
added chcp 65001 & before the request and everything is OK.
BUT does not pull out the data vseravno. Everything is correct on the command line
C:\Users\123>chcp 65001 & tasklist /FI "IMAGENAME eq example.exe" /FI "STATU
S eq NOT RESPONDING" /nh
Active code page: 65001
example.exe 3112 Console 2 A device attached to the system is not unctioning.
But zabbix stubbornly says that
3324:20150213:165537.215 EXECUTE_STR() command:'chcp 65001 & tasklist /FI "IMAGENAME eq example.exe" /FI "STATUS eq NOT RESPONDING" /nh' len:87 cmd_result:'Active code page: 65'
3324:20150213 :165537.216 Sending back [Active code page: 65001
INFO: No tasks are running which match the specified criteria.]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
proteus86, 2015-02-18
@proteus86

Generally understood. The whole problem is the lack of rights for the agent service to obtain the necessary information. running as an agent application with admin rights helped fix the situation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question