Skip to content

Commit

Permalink
Added netapp, fix allow unknown collectors
Browse files Browse the repository at this point in the history
  • Loading branch information
joente committed Jan 7, 2023
1 parent a0a1ed7 commit ed7355d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions bin/infrasonar
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ from dataclasses import dataclass
from setproctitle import setproctitle
from typing import Any, Optional, Dict, List, Tuple

__version__ = '0.1.3' # Update version in setup as well
__version__ = '0.1.4' # Update version in setup as well


_labels_example = """
Expand Down Expand Up @@ -241,6 +241,9 @@ _collectors = {
'address': (_test_address, ''),
'port': (_test_port, 1433),
},
'netapp': {
'address': (_test_address, ''),
},
'ping': {
'address': (_test_address, ''),
'interval': (_test_interval, 1),
Expand Down Expand Up @@ -450,6 +453,9 @@ def config_eq(orig, dest, control):
if orig == dest:
return True

if control is None:
return False

if dest:
for key, dval in dest.items():
v = control[key][1]
Expand Down Expand Up @@ -549,7 +555,8 @@ async def apply_asset(aa: ApplyAssets, dest: dict):
key = collector['key']
config = collector.get('config')
oc = collector_by_key(orig, key)
if oc and config_eq(oc.get('config'), config, _collectors[key]):
control = _collectors.get(key)
if oc and config_eq(oc.get('config'), config, control):
continue

changes = make_changes(changes)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name='infrasonar',
version='0.1.3', # Update version in infrasonar as well
version='0.1.4', # Update version in infrasonar as well
description='InfraSonar Toolkit',
url='https://github.com/infrasonar/toolkit',
long_description=long_description,
Expand Down

0 comments on commit ed7355d

Please sign in to comment.