{"id":13448972,"url":"https://github.com/vmware-archive/monitoring-indicator-protocol","last_synced_at":"2025-03-22T18:32:31.947Z","repository":{"id":34476327,"uuid":"167581906","full_name":"vmware-archive/monitoring-indicator-protocol","owner":"vmware-archive","description":"An observability as code project which allows developers to define and expose performance, scaling, and service level indicators for monitoring, alerting, and documentation. ","archived":true,"fork":false,"pushed_at":"2022-05-16T18:44:04.000Z","size":20603,"stargazers_count":30,"open_issues_count":2,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-19T00:04:21.980Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cloudfoundry-incubator/indicators","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vmware-archive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-25T16:56:59.000Z","updated_at":"2023-03-22T18:09:02.000Z","dependencies_parsed_at":"2022-08-09T09:40:44.013Z","dependency_job_id":null,"html_url":"https://github.com/vmware-archive/monitoring-indicator-protocol","commit_stats":null,"previous_names":["pivotal/indicator-protocol","pivotal/monitoring-indicator-protocol"],"tags_count":62,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fmonitoring-indicator-protocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fmonitoring-indicator-protocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fmonitoring-indicator-protocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmware-archive%2Fmonitoring-indicator-protocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vmware-archive","download_url":"https://codeload.github.com/vmware-archive/monitoring-indicator-protocol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245003025,"owners_count":20545535,"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-07-31T06:00:26.723Z","updated_at":"2025-03-22T18:32:26.921Z","avatar_url":"https://github.com/vmware-archive.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Monitoring Indicator Protocol\n\nThis is an **observability as code** project which allows developers to define and expose performance, scaling,\nand service level indicators for monitoring, alerting, and documentation.\nThe indicator definition ideally lives in the same repository as the code and is automatically registered when the code is deployed.\n\nThere are 3 main uses cases for this project: Generating documentation, validating against an actual deployment's data,\nand keeping a registry of indicators for use in monitoring tools such as prometheus alert manager and grafana.\n\nThis repository contains the OSS distributions of Indicator Protocol components:\n- [BOSH](https://github.com/pivotal/monitoring-indicator-protocol/tree/master/bosh-release)\n- [Binaries](https://github.com/pivotal/monitoring-indicator-protocol/releases)\n- [Kubernetes](https://github.com/pivotal/monitoring-indicator-protocol/tree/master/k8s)\n\nSee [the wiki](https://github.com/pivotal/monitoring-indicator-protocol/wiki) for more detailed information and documentation.\n\n## Developing Locally\n\nThis project currently requires only the Go programming language to develop.\nInstall go using `brew install go`, then proceed to the next steps. \nIf you would prefer to use a docker image instead, skip down to the [developing locally with docker section](#developing-with-docker)\n\nGoland Setup:\n1. Preferences -\u003e Go -\u003e Build Tags \u0026 Vendoring -\u003e Custom tags: `-mod=vendor`\n1. Preferences -\u003e Go -\u003e Go Modules (vgo) -\u003e Enable Go Modules (vgo) integration\n* If the vendored import statements are still red: option + enter -\u003e `Sync packages`\n\n### Running tests\n\nUse the provided script to run tests: `./scripts/test.sh`. By default, this runs the local tests (unit and integration tests that can be run without external dependencies). Run with `--help` to see the full list of test suites you can run. \n\n### Starting a registry and registry agent\n\n1. A script is provided to start both components: `./scripts/run_registry_and_agent.sh`\n1. To verify that this worked, open another terminal window, and use `./scripts/curl_indicators.sh` (or `./scripts/curl_indicators.sh | jq` if you have access to `jq`)\n   * Your result should look something like this:\n\n   ```json\n   [\n     {\n       \"apiVersion\": \"indicatorprotocol.io/v1\",\n       \"product\": {\n         \"name\": \"my-component\",\n         \"version\": \"1.2.3\"\n       },\n       \"metadata\": {\n         \"deployment\": \"my-service-deployment\",\n         \"source_id\": \"my-metric-source\"\n       },\n       \"indicators\": [\n         {\n           \"name\": \"only_in_example_yml\",\n           \"promql\": \"test_query\"\n         },\n         {\n           \"name\": \"doc_performance_indicator\",\n           \"promql\": \"avg_over_time(demo_latency{source_id=\\\"my-metric-source\\\",deployment=\\\"my-service-deployment\\\"}[5m])\",\n           \"thresholds\": [\n             {\n               \"level\": \"warning\",\n               \"operator\": \"gte\",\n               \"value\": 50\n             },\n             {\n               \"level\": \"critical\",\n               \"operator\": \"gt\",\n               \"value\": 100\n             }\n           ],\n           \"documentation\": {\n             \"description\": \"This is a valid markdown description.\\n\\n**Use**: This indicates nothing. It is placeholder text.\\n\\n**Type**: Gauge\\n**Frequency**: 60 s\\n\",\n             \"measurement\": \"Average latency over last 5 minutes per instance\",\n             \"recommendedResponse\": \"Panic! Run around in circles flailing your arms.\",\n             \"thresholdNote\": \"These are environment specific\",\n             \"title\": \"Doc Performance Indicator\"\n           },\n           \"presentation\": {\n             \"chartType\": \"line\",\n             \"currentValue\": false,\n             \"interval\": \"1m0s\"\n           }\n         },\n         {\n           \"name\": \"success_percentage\",\n           \"promql\": \"success_percentage_promql{source_id=\\\"origin\\\"}\",\n           \"documentation\": {\n             \"title\": \"Success Percentage\"\n           }\n         }\n       ],\n       \"layout\": {\n         \"title\": \"Monitoring Document Product\",\n         \"description\": \"Document description\",\n         \"sections\": [\n           {\n             \"title\": \"Indicators\",\n             \"description\": \"This section includes indicators\",\n             \"indicators\": [\n               \"doc_performance_indicator\"\n             ]\n           }\n         ],\n         \"owner\": \"Example Team\"\n       }\n     }\n   ]\n\n   ```\n\n   Specifically, you should get a single product called `my-component` with 3 indicators, some metadata,\n   and a layout section.\n   \n## Developing with Docker\nWe publish Docker images for all available jobs:\n- indicatorprotocol/bosh-indicator-protocol-registry\n- indicatorprotocol/bosh-indicator-protocol-registry-proxy\n- indicatorprotocol/bosh-indicator-protocol-registry-agent\n- indicatorprotocol/bosh-indicator-protocol-cf-auth-proxy\n- indicatorprotocol/bosh-indicator-protocol-status-controller\n- indicatorprotocol/bosh-indicator-protocol-prometheus-controller\n- indicatorprotocol/bosh-indicator-protocol-grafana-controller\n\nAdditionally, there is a `docker-compose.yml` file to orchestrate all of the jobs. There are a number of environment variables required, see `./scripts/start_docker_compose.sh` for reference.\n\nThe registry proxy runs on port 10567 by default. To curl indicator documents:\n\n```sh\ncurl https://localhost:10567/v1/indicator-documents -k \\\n--key test_fixtures/client.key \\\n--cert test_fixtures/client.pem \\\n--cacert test_fixtures/ca.key\n```\nGrafana and Prometheus controller jobs generate dashboard and alerting rules files, respectively, based on indicator documents availble in the registry. Both controllers write the generated files internally to the container in `/alerts` and `/dashboards`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmware-archive%2Fmonitoring-indicator-protocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmware-archive%2Fmonitoring-indicator-protocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmware-archive%2Fmonitoring-indicator-protocol/lists"}