Skip to content

Commit

Permalink
Modified check.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Kefa7y committed Dec 22, 2018
1 parent d192d67 commit 864bc57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.github/*
.vscode/*
.vscode/*
14 changes: 3 additions & 11 deletions neo4j/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ class Neo4jCheck(AgentCheck):

# Neo4j metrics to send
keys = set([
'kernelversion',
'storeid',
'storecreationdate',
'storelogversion',
'kernelstarttime',
Expand Down Expand Up @@ -50,13 +48,9 @@ class Neo4jCheck(AgentCheck):
'flushes',
'evictionexceptions',
'faults',
'ha.pull_interval',
'dbms.memory.pagecache.size',
])

display = {'kernelversion':'neo4j.kernel.version',
'storeid':'neo4j.storeid',
'storecreationdate':'neo4j.store.creationdate',
display = {'storecreationdate':'neo4j.store.creationdate',
'storelogversion':'neo4j.store.log.version',
'kernelstarttime':'neo4j.kernel.starttime',
'lastcommittedtxid':'neo4j.last.committed.transaction.id',
Expand Down Expand Up @@ -87,9 +81,7 @@ class Neo4jCheck(AgentCheck):
'bytesread':'neo4j.bytes.read',
'flushes':'neo4j.page.cache.flushes',
'evictionexceptions':'neo4j.page.cache.eviction.exceptions',
'faults':'neo4j.page.cache.faults',
'ha.pull_interval':'neo4j.ha.pull_interval',
'dbms.memory.pagecache.size':'neo4j.dbms.memory.pagecache.size'}
'faults':'neo4j.page.cache.faults'}

def __init__(self, name, init_config, agentConfig, instances=None):
AgentCheck.__init__(self, name, init_config, agentConfig, instances)
Expand Down Expand Up @@ -136,7 +128,7 @@ def check(self, instance):
if doc['row'][0].lower() in self.keys:
try:
self.gauge(self.display.get(doc['row'][0].lower(),""), doc['row'][1], tags=tags)
except ValueError as e:
except TypeError as e:
continue

def _get_config(self, instance):
Expand Down

0 comments on commit 864bc57

Please sign in to comment.