Skip to content
Snippets Groups Projects

6588 add couchdb check - add pending updates

Merged Hahn Axel (hahn) requested to merge 6588-add-couchdb-check into master
2 files
+ 98
32
Compare changes
  • Side-by-side
  • Inline

Files

+ 46
7
@@ -18,7 +18,7 @@ Check couchdb status.
@@ -18,7 +18,7 @@ Check couchdb status.
______________________________________________________________________
______________________________________________________________________
CHECK_COUCHDB
CHECK_COUCHDB
v0.3
v0.4
(c) Institute for Medical Education - University of Bern
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
Licence: GNU GPL 3
@@ -41,6 +41,7 @@ OPTIONS:
@@ -41,6 +41,7 @@ OPTIONS:
MODE is one of
MODE is one of
up show general couchdb status
up show general couchdb status
replication show last replication status
replication show last replication status
 
pending show count of pending updates for nodes, dbs and users
EXAMPLE:
EXAMPLE:
check_couchdb -m up
check_couchdb -m up
@@ -80,10 +81,10 @@ It switches to critical if one of the seeds is not "ok".
@@ -80,10 +81,10 @@ It switches to critical if one of the seeds is not "ok".
`check_couchdb -m up` returns
`check_couchdb -m up` returns
```txt
```txt
OK: Couchdb status (value in /_up is 'ok')
OK: Couchdb :: health status (value 'status' in /_up is 'ok')
Reponse:
Reponse of /_up:
{
{
"status": "ok", <<< checked value
"status": "ok",
"seeds": {
"seeds": {
"couchdb@192.168.25.172": {
"couchdb@192.168.25.172": {
"timestamp": "2023-08-28T07:27:54.938619Z",
"timestamp": "2023-08-28T07:27:54.938619Z",
@@ -97,8 +98,46 @@ Reponse:
@@ -97,8 +98,46 @@ Reponse:
"couchdb@192.168.25.61": {}
"couchdb@192.168.25.61": {}
}
}
}
}
 
```
```
 
### pending
 
 
From url ``/up`` it fetches from seeds -> [node] -> pending_updates the values for
 
 
* _nodes
 
* _dbs
 
* _users
 
 
and summarizes its values.
 
 
It switches to warning if one of the values is > 0.
 
 
This check sends performance data.
 
 
``check_couchdb -m pending`` returns
 
 
```txt
 
OK: Couchdb :: pending updates: 0 (values below 'pending_updates' in /_up)
 
Reponse: of /_up
 
{
 
"status": "ok",
 
"seeds": {
 
"couchdb@192.168.25.172": {
 
"timestamp": "2023-08-28T07:27:54.938619Z",
 
"last_replication_status": "ok",
 
"pending_updates": {
 
"_nodes": 0,
 
"_dbs": 0,
 
"_users": 0
 
}
 
},
 
"couchdb@192.168.25.61": {}
 
}
 
}
 
|nodes=0;; dbs=0;; users=0;;
 
```
 
### replication
### replication
From url ``/up`` it fetches seeds -> [node] -> last_replication_status.
From url ``/up`` it fetches seeds -> [node] -> last_replication_status.
@@ -107,14 +146,14 @@ It switches to critical if one of the seeds is not "ok".
@@ -107,14 +146,14 @@ It switches to critical if one of the seeds is not "ok".
``check_couchdb -m replication`` returns
``check_couchdb -m replication`` returns
```txt
```txt
OK: Couchdb replication
OK: Couchdb :: replication (values 'last_replication_status' in /_up are 'ok')
Reponse:
Reponse: of /_up
{
{
"status": "ok",
"status": "ok",
"seeds": {
"seeds": {
"couchdb@192.168.25.172": {
"couchdb@192.168.25.172": {
"timestamp": "2023-08-28T07:27:54.938619Z",
"timestamp": "2023-08-28T07:27:54.938619Z",
"last_replication_status": "ok", <<< checked value
"last_replication_status": "ok",
"pending_updates": {
"pending_updates": {
"_nodes": 0,
"_nodes": 0,
"_dbs": 0,
"_dbs": 0,
Loading