{"id":20111784,"url":"https://github.com/openstack/monasca-thresh","last_synced_at":"2025-04-07T13:06:03.755Z","repository":{"id":18654517,"uuid":"21861636","full_name":"openstack/monasca-thresh","owner":"openstack","description":"Monasca Thresholding Engine. Mirror of code maintained at opendev.org.","archived":false,"fork":false,"pushed_at":"2024-12-13T15:03:19.000Z","size":1284,"stargazers_count":48,"open_issues_count":0,"forks_count":21,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-31T11:05:19.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opendev.org/openstack/monasca-thresh","language":"Java","has_issues":false,"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/openstack.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","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":"2014-07-15T13:55:41.000Z","updated_at":"2024-10-08T03:38:51.000Z","dependencies_parsed_at":"2025-01-16T17:15:16.374Z","dependency_job_id":"6c3e1cdf-6e2a-4363-9b0d-a6efc9e46c1b","html_url":"https://github.com/openstack/monasca-thresh","commit_stats":{"total_commits":377,"total_committers":38,"mean_commits":9.921052631578947,"dds":0.6153846153846154,"last_synced_commit":"2694dd2bb22f994d04a89d40dc67b7c6b7cc2f0d"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fmonasca-thresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fmonasca-thresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fmonasca-thresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fmonasca-thresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openstack","download_url":"https://codeload.github.com/openstack/monasca-thresh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657276,"owners_count":20974344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-13T18:17:41.506Z","updated_at":"2025-04-07T13:06:03.734Z","avatar_url":"https://github.com/openstack.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Team and repository tags\n========================\n\n.. image:: https://governance.openstack.org/tc/badges/monasca-thresh.svg\n    :target: https://governance.openstack.org/tc/reference/tags/index.html\n\n.. Change things from this point on\n\nmonasca-thresh\n==============\n\nMonitoring Thresholding Engine\n\nComputes thresholds on metrics and publishes alarms to Kafka when\nexceeded. The current state is also saved in the MySQL database.\n\nBased on Apache Storm, a free and open distributed real-time computation\nsystem. Also uses Apache Kafka, a high-throughput distributed messaging\nsystem.\n\n.. figure:: mon-thresh-architecture.png\n   :alt: Threshold Engine Architecture\n\nAlarms have three possible states: ``UNDETERMINED``, ``OK`` and\n``ALARM``. Alarms are defined by an expression that comes from the Alarm\nDefinition. For example:\n\n::\n\n   avg(cpu{service=nova}, 120) \u003e 90 or avg(load{service=nova}, 120) \u003e 15\n\nFor more details on Alarm Definitions versus Alarms refer to the Monasca\nAPI documentation at\nhttps://github.com/openstack/monasca-api/blob/master/docs/monasca-api-spec.md.\n\nIf the expression evaluates to true, the Alarm state transitions to\n``ALARM``, if it evaluates to false, the state transitions to ``OK`` and\nif there aren’t any metrics for the two times the measuring period, the\nAlarm state transitions to ``UNDETERMINED``. Each part of the expression\nis represented by a Sub Alarm, so for the above example, there are two\nSub Alarms.\n\nThe Threshold Engine is designed as a series of Storm Spouts and Bolts.\nFor an overview of Storm, look at [the tutorial][storm-tutorial]. Spouts\nfeed external data into the system as messages while bolts process\nincoming messages and optionally produce output messages for a\ndownstream bolt.\n\nThe flow of Metrics is MetricSpout to MetricFilteringBolt to\nMetricAggregationBolt. The MetricSpout reads metrics from Kafka and\nsends them on through Storm. Metrics are routed to a specific\nMetricFilteringBolt based on a routing algorithm that computes a hash\ncode like value based on the Metric Definition so a Metric with the same\nMetricDefinition is always routed to the same MetricFilteringBolt.\n\nThe MetricFilteringBolt checks what Alarm Definitions this metric\nmatches, if any. If it matches a new Alarm Definition, the\nMetricFilteringBolt first sends it to the AlarmCreationBolt. It thens\nsends the metric to the MetricAggregationBolts once for each matching\nAlarm Definition. The routing is done by the combination of metric name\nand tenant id to ensure the same MetricAggregationBolt gets the metric\neach time.\n\nSo, each Metric is routed through one of the MetricFilteringBolts. The\nMetricAggregationBolts processes many fewer Metrics because few Metrics\nare associated with an Alarm.\n\nThe MetricAggregationBolt adds the Metric information to its total for\neach SubAlarms. Once a minute, the MetricAggregationBolts use the\nAggregated Metrics to evaluate each Sub Alarms. If the state changes on\nthe Sub Alarm, the state change is forwarded to the\nAlarmThresholdingBolts. The AlarmThresholdingBolts look at the entire\nAlarm Expression to evaluate the state of the Alarm.\n\nThe AlarmCreationBolt looks at its incoming metrics and creates new\nAlarms as needed. It may also add the metric to an existing Alarm if it\nfits there. The metrics are routed to the AlarmCreationBolt by the\nAlarmDefinitionId. The AlarmCreationBolt forwards new SubAlarms to the\nMetricAggregationBolts when an Alarm is created.\n\nEvents also flow into the Threshold Engine via Kafka so the Threshold\nEngine knows about Alarm creations, updates and deletes. The EventSpout\nreads the Events from Kafka and sends them to the appropriate bolts.\n\n\nBuild\n=====\n\nRequires monasca-common from\nhttps://github.com/openstack/monasca-common. Download and follow the\ninstructions in the README\n\n::\n\n   cd thresh\n   mvn package\n\nStackForge Build\n================\n\nThere is a pom.xml in the base directory that should only be used for\nthe StackForge build. The StackForge build is a rather strange build\nbecause of the limitations of the current StackForge java jobs and\ninfrastructure. This build depends on jars that are built in the\nmonasca-common build. That StrackForge build uploads the completed jars\nto http://tarballs.openstack.org/ci/monasca-common, but they are just\nregular jars, and not in a maven repository. Hence, the first thing the\nmaven build from the base project does is execute the build in the\ndownload directory. That pom.xml executes the script download.sh which\ndownloads the required jars from\nhttp://tarballs.openstack.org/ci/monasca-common and then uses maven to\ninstall them in the local directory. The maven install needs the pom.xml\nso that is pulled from the jar file and then changed to have the right\nversion before the install.\n\nThe monasca-common jars also need the base monasca-common pom.xml. So,\nthat is pulled from gihtub.com and also installed in the local\nrepository.\n\nSince this is all rather complex, that part of the build only works on\nStackForge so follow the simple instruction above if you are building\nyour own monasca-thresh.\n\nCurrently this build is executed on the bare-precise nodes in StackForge\nand they only have maven 2. So, this build must be kept compatible with\nMaven 2. If another monasca-common jar is added as a dependency to\njava/pom.xml, it must also be added to download/download.sh.\n\nA change has been submitted to StackForge to switch to bare-trusty for\nthis build in the hopes that those systems will have maven 3, but it is\nnot known how long that change will take to be accepted.\n\nCombining monasca-common, monasca-thresh, monasaca-api and\nmonasca-persister into one build would vastly simplify the builds but\nthat is a future task.\n\nLicense\n=======\n\nCopyright (c) 2014-2016 Hewlett-Packard Development Company, L.P.\n\nLicensed under the Apache License, Version 2.0 (the “License”); you may\nnot use this file except in compliance with the License. You may obtain\na copy of the License at\n\n::\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nThird-Party Licenses\n====================\n\nMonasca-thresh uses third-party libraries or other resources that may be\ndistributed under licenses different than the monasca-thresh software.\nExecuting the `mvn package`_ command a list of all third-party licenses\nwill be generated in ``target/generated-sources/license`` directory.\n\n.. _Team and repository tags: https://governance.openstack.org/tc/reference/tags/index.html\n.. _mvn package: https://github.com/openstack/monasca-thresh/blob/master/README.md#build\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fmonasca-thresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstack%2Fmonasca-thresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fmonasca-thresh/lists"}