{"id":18637340,"url":"https://github.com/openshift/origin-metrics","last_synced_at":"2025-04-11T09:32:50.318Z","repository":{"id":55499044,"uuid":"42467850","full_name":"openshift/origin-metrics","owner":"openshift","description":null,"archived":false,"fork":false,"pushed_at":"2020-07-14T06:19:33.000Z","size":757,"stargazers_count":79,"open_issues_count":0,"forks_count":113,"subscribers_count":164,"default_branch":"master","last_synced_at":"2025-03-25T12:12:49.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openshift.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-14T18:14:38.000Z","updated_at":"2024-10-10T03:34:39.000Z","dependencies_parsed_at":"2022-08-15T01:50:34.674Z","dependency_job_id":null,"html_url":"https://github.com/openshift/origin-metrics","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Forigin-metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Forigin-metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Forigin-metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Forigin-metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openshift","download_url":"https://codeload.github.com/openshift/origin-metrics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248368330,"owners_count":21092336,"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-07T05:35:22.808Z","updated_at":"2025-04-11T09:32:45.309Z","avatar_url":"https://github.com/openshift.png","language":"Shell","readme":"[NOTE]\n====\nHow metrics is installed has changed from using the deployer pod to using ansible.\n\nPlease see the link:https://docs.openshift.org/latest/install_config/cluster_metrics.html[OpenShift Metrics installation instructions] for more information.\n====\n\n= origin-metrics\n\n== About\n\nOrigin Metrics is designed to gather container, pod and node metrics from across an entire OpenShift cluster. These metrics can then be viewed in the OpenShift Console or exported to another system.\n\nIt achieves this goals via these main components:\n\n==== Heapster\nlink:https://github.com/kubernetes/heapster[Heapster] gathers the metrics from across the OpenShift cluster. It retrieves metadata associated with the cluster from the master API and retrieves individual metrics from the `/stats` endpoint which is exposed on each individual OpenShift node.\n\nIt gathers system level metrics such as CPU, Memory, Network, etc\n\nHeapster will then send these metrics to Hawkular Metrics and expose a REST endpoint that the horizontal pod autoscaler (HPA) uses.\n\n==== Hawkular Metrics\nlink:https://github.com/hawkular/hawkular-metrics/[Hawkular Metrics] is the metric storage engine from the link:http://www.hawkular.org/[Hawkular] project. It provides means of creating, accessing and managing historically stored metrics via an easy to use json based REST interface.\n\nHawkular Metrics uses Cassandra as its metric datastore.\n\nIt receives metrics from the Heapster component and is also used to expose metrics to the console and other third party systems.\n\n==== Cassandra\nlink:http://cassandra.apache.org/[Cassandra] is the data store for Hawkular Metrics. It stores and persists all the metrics coming in from Hawkular Metrics.\n\n==== Hawkular OpenShift Agent\nThe link:https://github.com/hawkular/hawkular-openshift-agent[Hawkular OpenShift Agent] is a component which can be used to gather application level metrics coming from pods. This allows pods themselves to expose metrics that they wish to be collected.\n\nThis component runs as a deamon set across the OpenShift cluster and is responsible for gathering application level metrics from each pod running on that node.\n\nBy default we deploy the agent to the `default` project. By deploying to the `default` project, the agent will be able to monitor all pods even if running with the `ovs_multitenant` plugin.\n\n[NOTE]\n====\nThe Hawkular OpenShift Agent is currently in Tech Preview.\n====\n\n== Before You Begin\n\nThe Metrics components requires that OpenShift is properly installed and configured. How to properly install and configure OpenShift is beyond the scope of this document. Please see the link:https://docs.openshift.org/latest/welcome/index.html[OpenShift documentation] on how to properly install and setup your system.\n\nThe metrics install requires integation with the OpenShift cluster and if there are installation or configuration problems with your OpenShift cluster you may encounter them when tyring to running metrics. Some of the more common issues are checked in the deployer pod and will give you an error message about your installation.\n\nPlease see the link:docs/troubleshooting.adoc[troubleshooting guide] for a complete list of things to watch out for.\n\n== Installing\n\nThe link:https://docs.openshift.org/latest/install_config/cluster_metrics.html[OpenShift documentation] describes how to install metrics.\n\n[NOTE]\n====\nThe old way of deploying metrics which rely on using the deployer pod is now deprecated. For the old instructions please see the link:docs/deployer_installation.adoc[deployer installation page].\n====\n\n== Deploying the Hawkular OpenShift Agent\n\nA few steps are required to deploy the link:https://github.com/hawkular/hawkular-openshift-agent[Hawkular OpenShift Agent] into OpenShift.\n\nYou will first need to create the ConfigMap that the Agent uses to configure itself:\n----\n$oc create -f hawkular-agent/hawkular-openshift-agent-configmap.yaml -n default\n----\n\nYou will then need to process the Agent's template and deploy its components:\n----\n$oc process -f hawkular-agent/hawkular-openshift-agent.yaml | oc create -n default -f -\n----\n\nFinally you will need to grant the `hawkular-openshift-agent`'s service acount the proper permissions:\n----\n$oc adm policy add-cluster-role-to-user hawkular-openshift-agent system:serviceaccount:default:hawkular-openshift-agent\n----\n\nOnce this is completed, the `Hawkular OpenShift Agent` should be deployed into the `default` project.\n\nIf you are running the latest OpenShift, you should be able to verify that the agent is functioning by seeing extra metrics showing up under the agent's pod metric page.\n\nFor instructions on how to expose custom metrics on your own pod and for more information about the agent itself, please the the link:https://github.com/hawkular/hawkular-openshift-agent[Hawkular OpenShift Agent] project.\n\n== Accessing Metrics Directly\n\nIf you wish to access and manage metrics directly, you can do so via the Hawkular Metrics REST API. This will allow you to directly access the raw metrics data and export it for use in your own customized systems.\n\nFor more information please see the link:docs/hawkular_metrics.adoc[Hawkular Metrics] page.\n\n== Accessing the Hawkular Metrics Python Client\n\nThe Hawkular Metrics pod has been configured so that the Hawkular Python client is installed and given admin priviledges by default. This will allow you to check and query metrics directly from within the Hawkular Metric pods.\n\nThe command to run the client is `client` and can be run from the terminal within the OpenShift console or via the `oc exec` command.\n\nPlease see the link:https://github.com/hawkular/hawkular-client-python[Hawkular Metrics python client project] for more information.\n\n== Accessing Heapster Directly\n\nThe Heapster deployed as part of origin-metrics is configured to be only accessible via the API Proxy. Access will require cluster-admin privileges or modifications to your policy to allow another user access to this API Proxy endpoint.\n\nFor example, to reach the Heapster `metrics` endpoint, you would need to access it by doing something like:\n\n----\n$ curl -H \"Authorization: Bearer XXXXXXXXXXXXXXXXX\" \\\n       -X GET https://${KUBERNETES_MASTER}/api/v1/proxy/namespaces/openshift-infra/services/https:heapster:/api/v1/model/metrics\n----\n\nFor more information about Heapster and how to access its APIs, please refer the link:https://github.com/kubernetes/heapster/[Heapster] project.\n\n== Cleanup\n\nIf you wish to undeploy and remove everything deployed by the deployer, the follow commands can be used:\n\n----\n$ oc delete all,secrets,sa,templates --selector=metrics-infra -n openshift-infra\n----\n\n[NOTE]\n====\nThe persistent volume claim will not be deleted by the above command. If you wish to permanently delete the data in persistent storage you can run `oc delete pvc --selector=metrics-infra`\n====\n\nIf you wish to remove the deployer's components themselves\n\n----\n$ oc delete sa,secret metrics-deployer -n openshift-infra\n----\n\n\n== Docker Containers\n\nAll the docker images for Origin Metric components are available at link:https://hub.docker.com/search/?q=openshift%2Forigin-metrics\u0026page=1\u0026isAutomated=0\u0026isOfficial=0\u0026starCount=0\u0026pullCount=0[docker hub] and there should not be a need to build these directly.\n\nIf you wish to build your own images or hack on the project. Please see the link:docs/build.adoc[build instructions].\n\n== Known Issues\n\nPlease see the link:docs/known_issues.adoc[known issues] page in the documentation.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshift%2Forigin-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenshift%2Forigin-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshift%2Forigin-metrics/lists"}