-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Metricbeat] Migrate couchbase cluster & pool metricset to new data g…
…eneration (#11112) The data.json is now generated based on example JSON documents. In case they change, it means the code change in some way. This will make it much easier to detect changes. Also the basic tests for the cluster are now covered by the new testing. The error handling moved over to the new error interface for simplicity.
- Loading branch information
Showing
17 changed files
with
374 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"storageTotals":{"ram":{"total":6246748160,"quotaTotal":314572800,"quotaUsed":104857600,"used":3155247104,"usedByData":53962032,"quotaUsedPerNode":104857600,"quotaTotalPerNode":314572800},"hdd":{"total":62725623808,"quotaTotal":62725623808,"used":5645306142,"usedByData":17923953,"free":57080317666}},"ftsMemoryQuota":512,"indexMemoryQuota":300,"memoryQuota":300,"name":"default","alerts":[],"alertsSilenceURL":"/controller/resetAlerts?token=0&uuid=9179f751ee7308159a00974c5da5229f","nodes":[{"systemStats":{"cpu_utilization_rate":5.670103092783505,"swap_total":1073737728,"swap_used":0,"mem_total":6246748160,"mem_free":5239775232},"interestingStats":{"cmd_get":0,"couch_docs_actual_disk_size":17154348,"couch_docs_data_size":17140736,"couch_spatial_data_size":0,"couch_spatial_disk_size":0,"couch_views_actual_disk_size":769605,"couch_views_data_size":769605,"curr_items":7303,"curr_items_tot":7303,"ep_bg_fetched":0,"get_hits":0,"mem_used":53962032,"ops":0,"vb_replica_curr_items":0},"uptime":"30","memoryTotal":6246748160,"memoryFree":5239775232,"mcdMemoryReserved":4765,"mcdMemoryAllocated":4765,"couchApiBase":"http://172.17.0.2:8092/","couchApiBaseHTTPS":"https://172.17.0.2:18092/","otpCookie":"snyykghcidiksmqs","clusterMembership":"active","recoveryType":"none","status":"healthy","otpNode":"[email protected]","thisNode":true,"hostname":"172.17.0.2:8091","clusterCompatibility":262149,"version":"4.5.1-2844-enterprise","os":"x86_64-unknown-linux-gnu","ports":{"sslProxy":11214,"httpsMgmt":18091,"httpsCAPI":18092,"proxy":11211,"direct":11210},"services":["index","kv","n1ql"]}],"buckets":{"uri":"/pools/default/buckets?v=42234267&uuid=9179f751ee7308159a00974c5da5229f","terseBucketsBase":"/pools/default/b/","terseStreamingBucketsBase":"/pools/default/bs/"},"remoteClusters":{"uri":"/pools/default/remoteClusters?uuid=9179f751ee7308159a00974c5da5229f","validateURI":"/pools/default/remoteClusters?just_validate=1"},"controllers":{"addNode":{"uri":"/controller/addNodeV2?uuid=9179f751ee7308159a00974c5da5229f"},"rebalance":{"uri":"/controller/rebalance?uuid=9179f751ee7308159a00974c5da5229f"},"failOver":{"uri":"/controller/failOver?uuid=9179f751ee7308159a00974c5da5229f"},"startGracefulFailover":{"uri":"/controller/startGracefulFailover?uuid=9179f751ee7308159a00974c5da5229f"},"reAddNode":{"uri":"/controller/reAddNode?uuid=9179f751ee7308159a00974c5da5229f"},"reFailOver":{"uri":"/controller/reFailOver?uuid=9179f751ee7308159a00974c5da5229f"},"ejectNode":{"uri":"/controller/ejectNode?uuid=9179f751ee7308159a00974c5da5229f"},"setRecoveryType":{"uri":"/controller/setRecoveryType?uuid=9179f751ee7308159a00974c5da5229f"},"setAutoCompaction":{"uri":"/controller/setAutoCompaction?uuid=9179f751ee7308159a00974c5da5229f","validateURI":"/controller/setAutoCompaction?just_validate=1"},"clusterLogsCollection":{"startURI":"/controller/startLogsCollection?uuid=9179f751ee7308159a00974c5da5229f","cancelURI":"/controller/cancelLogsCollection?uuid=9179f751ee7308159a00974c5da5229f"},"replication":{"createURI":"/controller/createReplication?uuid=9179f751ee7308159a00974c5da5229f","validateURI":"/controller/createReplication?just_validate=1"}},"rebalanceStatus":"none","rebalanceProgressUri":"/pools/default/rebalanceProgress","stopRebalanceUri":"/controller/stopRebalance?uuid=9179f751ee7308159a00974c5da5229f","nodeStatusesUri":"/nodeStatuses","maxBucketCount":10,"autoCompactionSettings":{"parallelDBAndViewCompaction":false,"databaseFragmentationThreshold":{"percentage":30,"size":"undefined"},"viewFragmentationThreshold":{"percentage":30,"size":"undefined"},"indexCompactionMode":"circular","indexCircularCompaction":{"daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday","interval":{"fromHour":0,"toHour":0,"fromMinute":0,"toMinute":0,"abortOutside":false}},"indexFragmentationThreshold":{"percentage":30}},"tasks":{"uri":"/pools/default/tasks?v=74113599"},"counters":{},"indexStatusURI":"/indexStatus?v=21137658","checkPermissionsURI":"/pools/default/checkPermissions?v=11181330","serverGroupsUri":"/pools/default/serverGroups?v=52184775"} |
81 changes: 81 additions & 0 deletions
81
metricbeat/module/couchbase/cluster/_meta/testdata/4.5.1.json-expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
[ | ||
{ | ||
"couchbase": { | ||
"cluster": { | ||
"hdd": { | ||
"free": { | ||
"bytes": 57080317666 | ||
}, | ||
"quota": { | ||
"total": { | ||
"bytes": 62725623808 | ||
} | ||
}, | ||
"total": { | ||
"bytes": 62725623808 | ||
}, | ||
"used": { | ||
"by_data": { | ||
"bytes": 17923953 | ||
}, | ||
"value": { | ||
"bytes": 5645306142 | ||
} | ||
} | ||
}, | ||
"max_bucket_count": 10, | ||
"quota": { | ||
"index_memory": { | ||
"mb": 300 | ||
}, | ||
"memory": { | ||
"mb": 300 | ||
} | ||
}, | ||
"ram": { | ||
"quota": { | ||
"total": { | ||
"per_node": { | ||
"bytes": 314572800 | ||
}, | ||
"value": { | ||
"bytes": 314572800 | ||
} | ||
}, | ||
"used": { | ||
"per_node": { | ||
"bytes": 104857600 | ||
}, | ||
"value": { | ||
"bytes": 104857600 | ||
} | ||
} | ||
}, | ||
"total": { | ||
"bytes": 6246748160 | ||
}, | ||
"used": { | ||
"by_data": { | ||
"bytes": 53962032 | ||
}, | ||
"value": { | ||
"bytes": 3155247104 | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"event": { | ||
"dataset": "couchbase.cluster", | ||
"duration": 115000, | ||
"module": "couchbase" | ||
}, | ||
"metricset": { | ||
"name": "cluster" | ||
}, | ||
"service": { | ||
"address": "127.0.0.1:55555", | ||
"type": "couchbase" | ||
} | ||
} | ||
] |
2 changes: 2 additions & 0 deletions
2
metricbeat/module/couchbase/cluster/_meta/testdata/config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type: http | ||
url: "/pools/default" |
File renamed without changes.
81 changes: 81 additions & 0 deletions
81
metricbeat/module/couchbase/cluster/_meta/testdata/docs.json-expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
[ | ||
{ | ||
"couchbase": { | ||
"cluster": { | ||
"hdd": { | ||
"free": { | ||
"bytes": 46902679716 | ||
}, | ||
"quota": { | ||
"total": { | ||
"bytes": 63381999616 | ||
} | ||
}, | ||
"total": { | ||
"bytes": 63381999616 | ||
}, | ||
"used": { | ||
"by_data": { | ||
"bytes": 16369010 | ||
}, | ||
"value": { | ||
"bytes": 16479319900 | ||
} | ||
} | ||
}, | ||
"max_bucket_count": 10, | ||
"quota": { | ||
"index_memory": { | ||
"mb": 300 | ||
}, | ||
"memory": { | ||
"mb": 300 | ||
} | ||
}, | ||
"ram": { | ||
"quota": { | ||
"total": { | ||
"per_node": { | ||
"bytes": 314572800 | ||
}, | ||
"value": { | ||
"bytes": 314572800 | ||
} | ||
}, | ||
"used": { | ||
"per_node": { | ||
"bytes": 104857600 | ||
}, | ||
"value": { | ||
"bytes": 104857600 | ||
} | ||
} | ||
}, | ||
"total": { | ||
"bytes": 8359174144 | ||
}, | ||
"used": { | ||
"by_data": { | ||
"bytes": 53962016 | ||
}, | ||
"value": { | ||
"bytes": 8004751360 | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"event": { | ||
"dataset": "couchbase.cluster", | ||
"duration": 115000, | ||
"module": "couchbase" | ||
}, | ||
"metricset": { | ||
"name": "cluster" | ||
}, | ||
"service": { | ||
"address": "127.0.0.1:55555", | ||
"type": "couchbase" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.