Remove PID from Windows Performance Counter
-
We are monitor some W3SVC_W3WP counters in netxms. The counters have a name format such as PID_APPPOOL. I was able to remove the PID from {instance-name} but if I remove it from {instance} the DCI doesn't work anymore. When the service restarts there is a new PID generated which creates a new DCI with the same {instance-name} but a different {instance}. What I would like to see if it's possible, is somehow keep the same DCI but allow the PID to change. The problem is we lose historical data when the new DCI is created and the old one ages out. Does anyone know of a solution for this?
-
Script-based DCI will be the best soluion here, I think.
Script should be something like (pseudo code):
value = null; if (CURRENT_NAME@$node != null) { // custom attribute CURRENT_NAME on current node value = $node->readAgentParameter("..." . CURRENT_NAME@$node); } if (value == null) { for (item : $node->readAgentList("...")) { if (item match "...") { // correct element found $node->setCustomAttribute(CURRENT_NAME, item); } } if (CURRENT_NAME@$node != null) { // custom attribute CURRENT_NAME on current node value = $node->readAgentParameter("..." . CURRENT_NAME@$node); } } return value;
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