Skip to content
Snippets Groups Projects
Commit ac30a2ea authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update doc page

parent a74306cb
No related branches found
No related tags found
1 merge request!1536588 add couchdb check
...@@ -18,7 +18,7 @@ Check couchdb status. ...@@ -18,7 +18,7 @@ Check couchdb status.
______________________________________________________________________ ______________________________________________________________________
CHECK_COUCHDB CHECK_COUCHDB
v0.6 v0.7
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
...@@ -39,16 +39,24 @@ OPTIONS: ...@@ -39,16 +39,24 @@ OPTIONS:
response will be shown response will be shown
MODE is one of MODE is one of
up show general couchdb status httpd Show counters for http request types
replication show last replication status httpd_methods Show counters for http request methods
pending show count of pending updates for nodes, dbs and users
open_databases show number of open databases open_databases show number of open databases
open_os_files show number of file descriptors CouchDB has open open_os_files show number of file descriptors CouchDB has open
httpd_methods Show counters for http request methods replication show last replication status
pending show count of pending updates for nodes, dbs and users
replication show last replication status
up show general couchdb health status
EXAMPLE: EXAMPLE:
check_couchdb -m up check_couchdb -m up
Check if couchdb is up and running Check if couchdb is up and running
check_couchdb -m httpd_methods
Show counters and change rate per sec of GET, POST, and other methods
check_couchdb -c /opt/couchdb/myconfig.sh -m up
Source another config to define COUCH_URL
``` ```
...@@ -74,35 +82,87 @@ With parameter ``-c CFGFILE`` can define another location where to find the vari ...@@ -74,35 +82,87 @@ With parameter ``-c CFGFILE`` can define another location where to find the vari
With the parameter ``-m METHOD`` you define what kind of check to perform. With the parameter ``-m METHOD`` you define what kind of check to perform.
### up ### httpd
Simple check if couchdb is up and running. Show counters for http request types.
From url ``/up`` it fetches the value status. All values are taken from ``/_node/_local/_stats/couchdb/httpd``
It switches to critical if one of the seeds is not "ok".
`check_couchdb -m up` returns ``check_couchdb -m httpd_methods`` returns
```txt ```txt
OK: Couchdb :: health status (value 'status' in /_up is 'ok') OK: Couchdb :: Http request methods
Reponse of /_up: ______________________Property____Counter______Delta
{ aborted_requests 0 0 per sec
"status": "ok", bulk_requests 0 0 per sec
"seeds": { requests 190116 1 per sec
"couchdb@192.168.25.172": { view_timeouts 0 0 per sec
"timestamp": "2023-08-28T07:27:54.938619Z", find_timeouts 0 0 per sec
"last_replication_status": "ok", explain_timeouts 0 0 per sec
"pending_updates": { all_docs_timeouts 0 0 per sec
"_nodes": 0, partition_view_requests 0 0 per sec
"_dbs": 0, partition_find_requests 0 0 per sec
"_users": 0 partition_explain_requests 0 0 per sec
} partition_all_docs_requests 0 0 per sec
}, partition_view_timeouts 0 0 per sec
"couchdb@192.168.25.61": {} partition_find_timeouts 0 0 per sec
} partition_explain_timeouts 0 0 per sec
} partition_all_docs_timeouts 0 0 per sec
temporary_view_reads 0 0 per sec
view_reads 0 0 per sec
clients_requesting_changes 0 0 per sec
purge_requests 0 0 per sec
|abortedrequests=0;; bulkrequests=0;; requests=1;; viewtimeouts=0;; findtimeouts=0;; explaintimeouts=0;; alldocstimeouts=0;; partitionviewrequests=0;; partitionfindrequests=0;; partitionexplainrequests=0;; partitionalldocsrequests=0;; partitionviewtimeouts=0;; partitionfindtimeouts=0;; partitionexplaintimeouts=0;; partitionalldocstimeouts=0;; temporaryviewreads=0;; viewreads=0;; clientsrequestingchanges=0;; purgerequests=0;;
```
``` ### httpd_methods
Show counters for http request methods.
All values are taken from ``/_node/_local/_stats/couchdb/httpd_request_methods``
``check_couchdb -m httpd_methods`` returns
```txt
OK: Couchdb :: Http request methods
____Method____Counter______Delta
COPY 0 0 per sec
DELETE 1 0 per sec
GET 190332 1 per sec
HEAD 0 0 per sec
OPTIONS 0 0 per sec
POST 0 0 per sec
PUT 0 0 per sec
|copy=0;; delete=0;; get=1;; head=0;; options=0;; post=0;; put=0;;
```
### open_databases
Show number of open databases
The value is taken from ``/_node/_local/_stats/couchdb/open_databases``
This check sends performance data.
``check_couchdb -m open_databases`` returns
```txt
OK: Couchdb :: open_databases = 0
|opendatabases=0;;
```
### open_os_files
Show number of file descriptors CouchDB has open
The value is taken from ``/_node/_local/_stats/couchdb/open_os_files``
This check sends performance data.
``check_couchdb -m open_os_files`` returns
```txt
OK: Couchdb :: open_os_files = 0
|openosfiles=0;;
```
### pending ### pending
...@@ -168,59 +228,32 @@ Reponse: of /_up ...@@ -168,59 +228,32 @@ Reponse: of /_up
} }
``` ```
### open_databases ### up
Show number of open databases
This check sends performance data.
``check_couchdb -m open_databases`` returns
```txt
OK: Couchdb :: open_databases = 0
Reponse: of /_node/_local/_stats/couchdb/open_databases
{
"value": 0,
"type": "counter",
"desc": "number of open databases"
}
|opendatabases=0;;
```
### open_os_files
Show number of file descriptors CouchDB has open Simple check if couchdb is up and running.
This check sends performance data. From url ``/up`` it fetches the value status.
It switches to critical if one of the seeds is not "ok".
``check_couchdb -m open_os_files`` returns `check_couchdb -m up` returns
```txt ```txt
OK: Couchdb :: open_os_files = 0 OK: Couchdb :: health status (value 'status' in /_up is 'ok')
Reponse: of /_node/_local/_stats/couchdb/open_os_files Reponse of /_up:
{ {
"value": 0, "status": "ok",
"type": "counter", "seeds": {
"desc": "number of file descriptors CouchDB has open" "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": {}
}
} }
|openosfiles=0;;
```
### httpd_methods
Show counters for http request methods.
``check_couchdb -m httpd_methods`` returns
```txt ```
OK: Couchdb :: Http request methods
Method Counter Delta
COPY 0 0 per sec
DELETE 1 0 per sec
GET 116122 1 per sec
HEAD 0 0 per sec
OPTIONS 0 0 per sec
POST 0 0 per sec
PUT 0 0 per sec
|copy=0;; delete=0;; get=1;; head=0;; options=0;; post=0;; put=0;;
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment