HTTPS SSH

SPECS Monitoring -- MoniPoli

SPECS MoniPoli is in charge with SPECS Monitoring Events filtering and external component notification.

Table of contents

Installation

Requirements

  • nodejs 3.2
  • MongoDB
  • nodejs libraries: mongodb, express, xml2js and xmlbuilder (all are bundled in lib/ directory).

Installation steps

These installation steps are compatible with mOS 4.2.x or OpenSUSE 13.1 (with SPECS repositories activated) environments.

Install the requirements

zypper install nodejs 
cd /opt
hg clone https://bitbucket.org/specs-team/specs-core-monitoring-monipoli
cd /root
zypper addrepo --no-gpgcheck https://repo.mongodb.org/zypper/suse/11/mongodb-org/3.0/x86_64/ mongodb
zypper install mongodb-org

Control the service

systemctl mongod start
/opt/specs-core-monitoring-monipoli/bootstrap.sh [start|stop|status]

Customize the settings

All the settings parameters are specified in etc/vars.sh

  • _enforcement_address='localhost'
  • specify the Enforcement Diagnosis hostname;
  • _enforcement_port='8080'
  • specify the Enforcement Diagnosis port;
  • _enforcement_url='/diagnosis-api/notifications'
  • specify the Enforcement Diagnosis URL;
  • _monitoring_address='localhost'
  • specify the Event Hub router hostname;
  • _monitoring_port='9090'
  • specify the Event Hub router port;
  • #_database_uri='mongodb://MONGO_INSTANCE_IP_1:27017,MONGO_INSTANCE_IP_2:27017,MONGO_INSTANCE_IP_3:27017/monipoli?replicaSet=specs-db&connectTimeoutMS=300000'
  • uncomment this option if you have configured you MongoDB backend in replica mode and set the appropiate IP addresses of the instances;

The REST interface

If the service was started successfully it will expose a RESTful interface at the address:

that accepts HTTP GET, POST and DELETE calls.

Usage

The interaction with this service is possible using HTTP REST calls. MoniPoli requires an SLA document to compute the filtering rules from it.

Register a SLA document

curl -4 -H Content-Type:application/json -X POST --data-binary @/path/to/SLA_FILE.xml localhost:5000/monipoli

List the registered filtering rules

curl -4 -X GET --data-binary localhost:5000/monipoli

Rule1:
level_of_redundancy_m1
specs_webpool_M1
1
geq
57457F9CE4B034AC28E5952E

Rule2:
number_of_servers_wp_msr1
number_of_servers_wp_msr1_var
1
lt
57457F9CE4B034AC28E5952E

where

  • line 1: represents the rule number;
  • line 2: represents the metric name;
  • line 3: represents the measurement identifier;
  • line 4: represents the expected value of the measurement identifier;
  • line 5: represents the logical operator to be applied on the value;
  • line 6: represents the SLA identifier;
  • line 7: empty line - delimiter.

or the output can be generated in JSON format:

curl -4 -X GET localhost:5000/monipoli?output=json

{
   "code": "0",
   "message": "Check the payload",
   "payload": [
      {
         "metric_id": "specs_webpool_M1",
         "msr_id": "level_of_redundancy_m1",
         "value": "1",
         "operator": "geq",
         "sla_id": "57457F9CE4B034AC28E5952E",
         "sla_id_ctp": "0",
         "slo_id": "webpool_slo1"
      },
      {
         "metric_id": "number_of_servers_wp_msr1_var",
         "msr_id": "number_of_servers_wp_msr1",
         "value": "1",
         "operator": "lt",
         "sla_id": "57457F9CE4B034AC28E5952E",
         "sla_id_ctp": "0",
         "slo_id": "number_of_servers_wp_msr1_slo"
      }
}

By default this method returns the rules associated will all the SLA active in MoniPoli for monitoring. If you want to receive the rules associated with a specific SLA then:

curl -4 -X GET localhost:5000/monipoli?output=json&slaid=SLA_ID

Delete rules associatied with a SLA

In case of a SLA termination the rules associated with that SLA can be deleted by using:

curl -4 -X DELETE -d '{"sla_id":"SLA_ID"}' localhost:5000/monipoli

and the response has the following format:

{
    "code" : "0 - ok | 1 - error",
    "message" : "short explanation",
    "payload" : "debugging information (traceback, suggestive message, etc.) [this is optional]"
}

NOTICE

This product includes software developed at "Institute e-Austria, Timisoara" and "CeRICT IT" as part of the "SPECS - Secure Provisioning of Cloud Services based on SLA Management" research project (an EC FP7-ICT Grant, agreement 610795).

Developers:

Silviu Panica, silviu@solsys.ro / silviu.panica@e-uvt.ro
Massimiliano Rak, max.rak@gmail.com

Copyright:

Copyright 2013-2015, Institute e-Austria, Timisoara, Romania and CeRICT
    http://www.ieat.ro/    http://www.cerict.it/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at:
    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.