Skip to content

Commit

Permalink
fix: discovery list syntax
Browse files Browse the repository at this point in the history
Signed-off-by: djerfy <[email protected]>
  • Loading branch information
djerfy committed Jan 11, 2024
1 parent 35837b3 commit f3576da
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/modules/kubernetes/base/cronjobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def zabbixDiscoveryCronjobs(config):
output = {
"{#KUBERNETES_CRONJOB_NAMESPACE}": cronjob['namespace'],
"{#KUBERNETES_CRONJOB_NAME}": cronjob['name']}
discovery['data'].append(output)
discovery['data'].append([output])

return [config['kubernetes']['name'], "kubernetes.cronjobs.discovery", json.dumps(discovery)]

Expand Down
2 changes: 1 addition & 1 deletion src/modules/kubernetes/base/daemonsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def zabbixDiscoveryDaemonsets(config):
output = {
"{#KUBERNETES_DAEMONSET_NAMESPACE}": daemonset['namespace'],
"{#KUBERNETES_DAEMONSET_NAME}": daemonset['name']}
discovery['data'].append(output)
discovery['data'].append([output])

return [config['kubernetes']['name'], "kubernetes.daemonsets.discovery", json.dumps(discovery)]

Expand Down
2 changes: 1 addition & 1 deletion src/modules/kubernetes/base/deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def zabbixDiscoveryDeployments(config):
output = {
"{#KUBERNETES_DEPLOYMENT_NAMESPACE}": deployment['namespace'],
"{#KUBERNETES_DEPLOYMENT_NAME}": deployment['name']}
discovery['data'].append(output)
discovery['data'].append([output])

return [config['kubernetes']['name'], "kubernetes.deployments.discovery", json.dumps(discovery)]

Expand Down
2 changes: 1 addition & 1 deletion src/modules/kubernetes/base/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def zabbixDiscoveryNodes(config):

for node in kubernetesGetNodes(config):
output = {"{#KUBERNETES_NODE_NAME}": node['name']}
discovery['data'].append(output)
discovery['data'].append([output])

return [config['kubernetes']['name'], "kubernetes.nodes.discovery", json.dumps(discovery)]

Expand Down
2 changes: 1 addition & 1 deletion src/modules/kubernetes/base/statefulsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def zabbixDiscoveryStatefulsets(config):
output = {
"{#KUBERNETES_STATEFULSET_NAMESPACE}": statefulset['namespace'],
"{#KUBERNETES_STATEFULSET_NAME}": statefulset['name']}
discovery['data'].append(output)
discovery['data'].append([output])

return [config['kubernetes']['name'], "kubernetes.statefulsets.discovery", json.dumps(discovery)]

Expand Down
2 changes: 1 addition & 1 deletion src/modules/kubernetes/base/volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def zabbixDiscoveryVolumes(config):
output = {
"{#KUBERNETES_PVC_NAMESPACE}": volume['namespace'],
"{#KUBERNETES_PVC_NAME}": volume['name']}
discovery['data'].append(output)
discovery['data'].append([output])

return [config['kubernetes']['name'], "kubernetes.volumes.discovery", json.dumps(discovery)]

Expand Down
2 changes: 1 addition & 1 deletion src/modules/kubernetes/openebs/cstorpoolclusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def zabbixDiscoveryCstorpoolclusters(config):
output = {
"{#KUBERNETES_OPENEBS_CSTORPOOLCLUSTER_NAMESPACE}": cstorpoolcluster['namespace'],
"{#KUBERNETES_OPENEBS_CSTORPOOLCLUSTER_NAME}": cstorpoolcluster['name']}
discovery['data'].append(output)
discovery['data'].append([output])

return [config['kubernetes']['name'], "kubernetes.openebs.cstorpoolclusters.discovery", json.dumps(discovery)]

Expand Down
2 changes: 1 addition & 1 deletion src/modules/kubernetes/openebs/cstorpoolinstances.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def zabbixDiscoveryCstorpoolinstances(config):
output = {
"{#KUBERNETES_OPENEBS_CSTORPOOLINSTANCE_NAMESPACE}": cstorpoolinstance['namespace'],
"{#KUBERNETES_OPENEBS_CSTORPOOLINSTANCE_NAME}": cstorpoolinstance['name']}
discovery['data'].append(output)
discovery['data'].append([output])

return [config['kubernetes']['name'], "kubernetes.openebs.cstorpoolinstances.discovery", json.dumps(discovery)]

Expand Down

0 comments on commit f3576da

Please sign in to comment.