Skip to content

Instantly share code, notes, and snippets.

@alapidas
Created October 22, 2014 20:35
Show Gist options
  • Save alapidas/21a60d812ede76e1c04b to your computer and use it in GitHub Desktop.
Save alapidas/21a60d812ede76e1c04b to your computer and use it in GitHub Desktop.
diff --git a/src/core/Products/ZenRRD/parsers/ps.py b/src/core/Products/ZenRRD/parsers/ps.py
index bb360f6..6ce6092 100644
--- a/src/core/Products/ZenRRD/parsers/ps.py
+++ b/src/core/Products/ZenRRD/parsers/ps.py
@@ -153,9 +153,11 @@ def matches(processMetrics):
results.values.append( (dp, cpu) )
if 'mem' in dp.id:
results.values.append( (dp, rss) )
- if 'count'in dp.id:
+ if 'count' in dp.id:
results.values.append( (dp, len(pids)) )
else:
+ if 'count' in dp.id:
+ results.values.append((dp,0))
failSeverity = dp.data['failSeverity']
# alert on missing (the process set contains 0 processes...)
summary = 'Process set contains 0 running processes: %s' % processSet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment