Project

General

Profile

task #8635

Updated by Andreas Kohlbecker over 4 years ago

We will use collectd + facette for now: 

 https://www.21x9.org/de/serverueberwachung-mit-collectd-und-facette.html 
 https://www.tecmint.com/configure-collectd-as-central-monitoring-server-for-clients/2/ 

 Test installation on edit-test as client and edit-staging as master to collect the time series data 

 **edit-staging:** 

 ~~~ 
 apt-get install build-essential golang-go librrd-dev pkg-config pandoc protobuf-compiler 
 ~~~ 

 install node_js:  

 https://github.com/nodesource/distributions/blob/master/README.md#deb 

 ~~~ 
 curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - 
 sudo apt-get install -y nodejs 
 npm install yarn -g 
 ~~~ 

 ## Facette 

 There is currently only sparse documentation on the configuration of facette. The only source of documentation are the issues: 

 * [RRD Provider setup in Admin Panel](https://github.com/facette/facette/issues/369) 
 * [RRD Provider setup via API](https://github.com/facette/facette/issues/336) API](See https://github.com/facette/facette/issues/336) 
 * [create new graph/collection -> create new graph/collection template](https://github.com/facette/facette/issues/379) 
 * [Graphs/Collections and Templates](https://github.com/facette/facette/issues/372) 

 installing facette from binaries 

 https://github.com/facette/facette/releases 

 ~~~ 
 mkdir /root/installer 
 wget https://github.com/facette/facette/releases/download/0.5.1/facette_0.5.1_stretch-amd64.deb 
 dpkg -i facette_0.5.1_stretch-amd64.deb 
 ~~~ 

 edit /etc/facette/facette.yaml: 

 ~~~ 
 listen: 160.45.63.177:12003 
 ~~~                    

 restart facette: 

 ~~~ 
 systemctl restart facette.service  
 ~~~ 


 **Configure the provider** 

 (See https://github.com/facette/facette/issues/336) 

 ~~~ 
 curl -s -H 'Content-Type: application/json' http://160.45.63.177:12003/api/v1/providers -d '                                                                                                                  ─╯ 
 { 
   "name": "collectd", 
   "description": null, 
   "created": "2017-06-14T06:09:19Z", 
   "modified": "2017-06-14T06:09:19Z", 
   "connector": "rrd", 
   "settings": { 
     "path": "/var/lib/collectd", 
     "pattern": "rrd/(?P<source>[^/]+)/(?P<metric>.+)\\.rrd" 
   }, 
   "filters": [ 
     {"action": "sieve", "target": "metric", "pattern": "/average$", "into": ""}, 
     {"action": "rewrite", "target": "metric", "pattern": "/average$", "into": ""}, 
     {"action": "rewrite", "target": "metric", "pattern": "/value$", "into": ""}, 
     {"action": "rewrite", "target": "metric", "pattern": "/", "into": "."}, 
     {"action": "rewrite", "target": "metric", "pattern": "^cpu\\.percent-", "into": "cpu.percent."}, 
     {"action": "rewrite", "target": "metric", "pattern": "^df-(.+)\\.(?:df_)?(.+)-(.+)", "into": "df.$1.$2.$3"}, 
     {"action": "rewrite", "target": "metric", "pattern": "^interface-(.+).if_(.+)\\.", "into": "net.$1.$2."}, 
     {"action": "rewrite", "target": "metric", "pattern": "^load\\.load\\.", "into": "load."}, 
     {"action": "rewrite", "target": "metric", "pattern": "^memory\\.memory-", "into": "memory."} 
   ], 
   "refresh_interval": 0, 
   "priority": 0, 
   "enabled": true 
 } 
 ' 
 ~~~ 

 the new provider should now be available at http://160.45.63.177:12003/admin/providers/ 


Back