{"id":15600529,"url":"https://github.com/flopezag/fiware-sla","last_synced_at":"2026-05-14T12:31:57.131Z","repository":{"id":80957805,"uuid":"122304992","full_name":"flopezag/fiware-sla","owner":"flopezag","description":"Management of FIWARE Lab nodes help-desk tickets SLA data","archived":false,"fork":false,"pushed_at":"2018-12-02T19:24:36.000Z","size":59,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T12:57:11.921Z","etag":null,"topics":["fiware","fiware-lab","fiware-ops","jira","pandas","python2"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flopezag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-21T07:28:32.000Z","updated_at":"2019-02-28T19:04:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b562f17-fe65-492d-a786-f2df1abb73e5","html_url":"https://github.com/flopezag/fiware-sla","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/flopezag/fiware-sla","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flopezag%2Ffiware-sla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flopezag%2Ffiware-sla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flopezag%2Ffiware-sla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flopezag%2Ffiware-sla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flopezag","download_url":"https://codeload.github.com/flopezag/fiware-sla/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flopezag%2Ffiware-sla/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33024919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fiware","fiware-lab","fiware-ops","jira","pandas","python2"],"created_at":"2024-10-03T02:04:05.501Z","updated_at":"2026-05-14T12:31:57.113Z","avatar_url":"https://github.com/flopezag.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FIWARE Lab ticket resolution SLA\n\n[![License badge](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\u003c!-- [![Build Status](https://travis-ci.org/flopezag/fiware-sla.svg?branch=master)](https://travis-ci.org/flopezag/fiware-sla)\n[![Coverage Status](https://coveralls.io/repos/github/flopezag/fiware-sla/badge.svg)](https://coveralls.io/github/flopezag/fiware-sla)\n[![Documentation Status](https://readthedocs.org/projects/fiware-sla/badge/?version=latest)](http://fiware-sla.readthedocs.io/en/latest/?badge=latest)\n--\u003e\n\nManagement of FIWARE Lab nodes help-desk tickets SLA resolution timne.\n\n* [Introduction](#introduction)\n* [Overall description](#overall_description)\n* [Build and Install](#build-and-install)\n* [Running](#running)\n* [Access to the historical information in Monasca](#Access_to_the_historical_information_in_Monasca)\n* [Deployment](#deployment)\n* [Testing](#testing)\n* [Support](#support)\n* [License](#license)\n\n## Introduction\n\nPython script to calculate the percentage of Help-Desk tickets responsed and resolved per each\nFIWARE Lab node in less than 24 working hours and less than 48 working hours.\n\n## Overall description\n\nThe procedure to calculate this percentages is taking all the tickets resolved\nsince 1st January 2017 till now in [Jira](https://jira.fiware.org) under the\nproject Help-Desk and identified with the component FIWARE-LAB-HELP. This component\ncorresponds to the tickets that were created from the corresponding mail list\nfiware-lab-help@lists.fiware.org.\n\nOnce that we have all the tickets, we categorized them into resolved and responded\nand calculate the time in which they were resolved and responded. A ticket is responded\nwhen the status of the ticket is moved from 'Open' to 'In Progress' or 'Answered'. A\nticket is resolved when it is moved from 'Close' status. The tickets that are dismissed\nfrom 'Open' status are also taking into account in terms of calculate the progress timne\nof them.\n\nNext step, once that we have the progressed time is calculate the different time. The process\nis calculating the difference in working hours. It means that every day has only 9 hours\n(from 8:00 to 17:00) to calculate the difference and weekends are not included. For example, if\na ticket was created on Friday 16/02/2018 at 9:35:24,43 and was resolved on Monday 19/02/2018\nat 8:47:43,12 the resolution time will be difference time on friday until end of working day\nplus the difference time from beginning of working day until the resolution time:\n\n    16/02/2018: from 09:35:24,43 to 17:00:00,00 = 07:24:35,57\n    19/02/2018: from 08:00:00,00 to 08:47:43,12 = 00:47:43,12\n\n    TOTAL TIME: 07:24:35,57 + 00:47:43,12 = 08:12:18,69\n\nTherefore the resolution time in that case was 8 hours, 12 minutes and 18,69 seconds. If the\nticket was created before 08:00:00, the starting point is considered 08:00:00. If the ticket is\nclosed after 17:00:00 it is considered closed at 17:00:00. In case of tickets created during\nweekends, the created time is the next Monday at 08:00:00. In case of tickets closed during\nweekends, the closed time is the previous Friday at 17:00:00.\n\nIn this process is not considered bank holidays for each region.\n\nOnce that we have the response and resolution times we send the information to the\n[OpenStack Monasca](https://wiki.openstack.org/wiki/Monasca) instance in order to keep centralized\nthe monitoring information and make afterwards if could be neccesary some type of statistical\nanalysis. For this purpose we store also the number of tickets for each region. Keep in mind,\nthat it is needed a request to [OpenStack Keystone](https://wiki.openstack.org/wiki/Keystone)\nservice in order to recover a proper token in order to send the information to the [Monasca API](https://github.com/openstack/monasca-api/blob/master/docs/monasca-api-spec.md). In that case we\nare using the tenant name service due to the Monasca instance is configured to pass the monitoring\ninformation under this tenant.\n\n## Build and Install\n\n### Requirements\n\nThe following software must be installed:\n\n* Python 2.7\n* pip\n* virtualenv\n\n### Installation\n\nThe recommend installation method is using a virtualenv. Actually, the\ninstallation process is only about the python dependencies, because the python\ncode do not need installation.\n\n1. Clone this repository.\n1. Define the configuration file in './config/fiware-sla.ini'\n1. Execute the script 'source ./deploy/config.sh'.\n1. With root user, execute the command 'cp ./config/fiware-sla.logrotate /etc/logrotate.d/fiware-sla'.\n\n## Running\n\nOnce that you have installed and configured your application, you can run it\njust executing:\n\n    python SLAMeassurement.py\n\nAnd it will be executed in order to calculate the corresponding SLA levels for all the nodes and\nsend the information to the configured Monasca interface. Keep in mind that you have to be inside\na previously defined virtual environment.\n\nThe ``config.sh`` file that you can find in the [deploy](deploy) folder is used in order to allow\nthe automatic execution of the python script just adding the corresponding header to the file\nSLAMeassurement.py:\n\n    #!/usr/bin/env /env/bin/python\n\nWhere env is the name of your virtual environment.\n\nLast but not least, the service is added into the\n[crontab](https://manpages.debian.org/jessie/cron/crontab.5.en.html) of the machine in order to\nexecute the service every day at 02:00:00.\n\n## Access to the historical information in Monasca\n\nThe service is configured in order to send the data to the [FIWARE OpenStack Monasca](monasca.lab.fiware.org)\nservice in order to keep a historical information about the resolution of the tickets. You can check those\nmeassurements directly over the Monasca API but previously it is required to obtain a secure token\nassociated to the ceilometer service requesting it to the Keystone instance:\n\n```console\ncurl -X POST   http://cloud.lab.fiware.org:4730/v2.0/tokens  \\\n     -H 'Accept: application/json'   \\\n     -H 'Content-Type: application/json'   \\\n     -d '{\n    \"auth\": {\n        \"tenantName\": \"service\",\n        \"passwordCredentials\": {\n            \"username\": \"\u003cceilometer service user, one per region\u003e\",\n            \"password\": \"\u003cceilometer service user password\u003e\"\n        }\n    }\n}' | jq .access.token.id\n```\n\nIf you do not have installed the [jq tool](https://stedolan.github.io/jq/), please download it in order to navigate\ninside the json response and obtain the proper token id in a easy way.\n\nNow, it is time to remember how is managed the metrics inside Monasca. In order to send the data\nwe have defined two dimensions in Monasca:\n\n* metric: a metric name to filter metrics by. By default we have defined the metrics region.ticket_resolve_time\n  and region.ticket_response_time for the percentage of resolve and response of the Help-Desk associated to each\n  region. You can obtain this data also requesting to Monasca API:\n\n  ```console\n  curl -X GET   http://monasca.lab.fiware.org:8070/v2.0/metrics/names   \\\n       -H 'Cache-Control: no-cache'   \\\n       -H 'X-Auth-Token: \u003cCeilometer service token\u003e' | jq .elements[].name\n  ```\n\n* source: the application that provide this SLA data, in our case it is fixed to fiware-sla\n* region: this is the region name in which we calculate the values of SLA. You can request the list of available \n  regions directly to Monasca through the execution of the following query:\n\n  ```console\n  curl -X GET   'http://monasca.lab.fiware.org:8070/v2.0/metrics?name=region.ticket_resolve_time'   \\\n       -H 'Cache-Control: no-cache'   \\\n       -H 'X-Auth-Token: \u003cCeilometer service token\u003e' | jq .elements[].dimensions.region\n  ```\n\nNow to request the meassurements associated to the ticket resolve time in the Spain region starting at 15/08/2018\njust execute the following query:\n\n```console\ncurl -X GET   'http://monasca.lab.fiware.org:8070/v2.0/metrics/measurements?name=region.ticket_resolve_time\u0026start_time=2018-08-15T00:00:01Z\u0026dimensions=region:Spain'   \\\n     -H 'Cache-Control: no-cache'   \\\n     -H 'X-Auth-Token: \u003cCeilometer service token\u003e' | jq\n```\n\nIf you want to get more details about the use of OpenStack Monsca API, please take a look to the official\ndocumentation about it in [monasca-api](https://github.com/openstack/monasca-api).\n\n## Deployment\n\nThere is a specific option to deploy this service in a host. Take a look to\nthe content of [deploy](deploy/README.md) directory\n\n## Testing\n\n### Unit Tests\n\nIt was defined a minimum set of tests to cover the core functionality of the\nservice. The ``tests`` target is used for running the unit tests in the\ncomponent. We use for those tests the tox tool.\n[Tox](https://tox.readthedocs.io/en/latest/) is a generic\n[virtualenv](https://pypi.python.org/pypi/virtualenv) management and test\ncommand line tool you can use for checking your package installs correctly\nwith different Python versions and interpreters running your tests in each\nof the environments, configuring your test tool of choice acting as a\nfrontend to Continuous Integration servers, greatly reducing boilerplate and\nmerging CI and shell-based testing.\n\nThe configuration file can be found in ``tox.ini`` in which we have defined two\ndifferent environments:\n\n* The first one, to test the service using [nosetests](http://nose.readthedocs.io/en/latest/).\n* The second one, to check the python coding style using [pycodestyle](https://pycodestyle.readthedocs.io/en/latest/)\n\nFirst of all, you need to install the tool with the following commands:\n\n    pip install tox\n\nNow, you can run the tests, simply execute the commands:\n\n    tox\n\n## Support\n\nThe support of this service is under github. You can create your [issues](https://github.com/flopezag/fiware-sla/issues/new)\nand they will be resolved by the development team in the following sprint.\n\n## License\n\n\\(c) 2018 FIWARE Foundation, e.V., Apache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflopezag%2Ffiware-sla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflopezag%2Ffiware-sla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflopezag%2Ffiware-sla/lists"}