Process.Count returns 0 even EXE is running
-
-
Hi Marco,
Yes, this is a bug in the Windows agent: https://github.com/netxms/netxms/issues/3656
Process.Count never sees the most recently started process on the machine. So it returns 0 while your EXE is the newest running process, and goes back to 1 as soon as something else starts after it - that's why it looks random. It's not specific to 6.2, so downgrading won't help. Process.CountEx and the other Process.* metrics have the same problem.
Until it's fixed: if the process runs as a service, monitor the service instead (service name, not display name; 0 means running):
System.ServiceState(ServiceName)Otherwise, with the WMI subagent loaded (SubAgent = wmi.nsm in nxagentd.conf), this returns the real count:
WMI.Query(root\cimv2,"SELECT ProcessId FROM Win32_Process WHERE Name='yourapp.exe'",%%count%%) -
-
Yes, it's already fixed in the code and will be in 6.2.6, which isn't released yet: https://github.com/netxms/netxms/issues/3656. Only the agent on the Windows machine needs to be updated.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login