{"id":19140961,"url":"https://github.com/gridscale/linux-psi-telegraf-plugin","last_synced_at":"2025-04-19T11:30:56.397Z","repository":{"id":98489555,"uuid":"447602490","full_name":"gridscale/linux-psi-telegraf-plugin","owner":"gridscale","description":"A plugin for telegraf which will add pressure stall information (psi) from the Linux kernel to influxdb","archived":false,"fork":false,"pushed_at":"2022-01-18T08:30:53.000Z","size":110,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-06-20T13:40:31.419Z","etag":null,"topics":["influxdata-telegraf","influxdb","metrics","metrics-gathering","monitoring","psi","telegraf","telegraf-plugin"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gridscale.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2022-01-13T13:06:23.000Z","updated_at":"2023-04-20T18:51:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"30334c74-c85f-43d0-b872-bf17509194dc","html_url":"https://github.com/gridscale/linux-psi-telegraf-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridscale%2Flinux-psi-telegraf-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridscale%2Flinux-psi-telegraf-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridscale%2Flinux-psi-telegraf-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridscale%2Flinux-psi-telegraf-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gridscale","download_url":"https://codeload.github.com/gridscale/linux-psi-telegraf-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223796785,"owners_count":17204321,"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":["influxdata-telegraf","influxdb","metrics","metrics-gathering","monitoring","psi","telegraf","telegraf-plugin"],"created_at":"2024-11-09T07:19:35.654Z","updated_at":"2025-04-19T11:30:56.390Z","avatar_url":"https://github.com/gridscale.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!NOTE]  \n\u003e As of [Telegraf 1.30](https://github.com/influxdata/telegraf/releases/tag/v1.30.0) PSI (Pressure Stall Information) metrics will be collected without needing this plugin.\n\n# linux-psi-telegraf-plugin\n\nThis telegraf plugin will push the pressure stall information (PSI) from the Linux Kernel to influx.\n\nFor more information about the PSI metrics read [facebooks documentation](https://facebookmicrosites.github.io/psi/).\n\nThe following metrics will be pushed to telegraf:\n\n- avg10, avg60, avg300, total for\n  - `/proc/pressure/cpu` (some)\n  - `/proc/pressure/memory` (some and full)\n  - `/proc/pressure/io` (some and full)\n\n## Configuration\n\n```\n[[inputs.execd]]\n  command = [\"/usr/local/bin/psi\"]\n  signal = \"none\"\n```\n\n## Measurements \u0026 Fields\n\n- pressureTotal\n  - total\n- pressure\n  - avg10\n  - avg60\n  - avg300\n\n## Tags\n\n- All measurement have the following tags:\n  - resource: one of `cpu`, `memory` or `io`\n  - type: either `some` or `full`\n\n\n## Example Output\n\n```\npressureTotal,resource=cpu,type=some total=2302995431i 1642080601757211558\npressureTotal,resource=memory,type=some total=7459296i 1642080601757229544\npressureTotal,resource=io,type=some total=113202241i 1642080601757233510\npressureTotal,resource=memory,type=full total=3378729i 1642080601757326002\npressureTotal,resource=io,type=full total=90569049i 1642080601757329299\npressure,resource=cpu,type=some avg60=1.69,avg300=1.56,avg10=1.38 1642080601757332616\npressure,resource=memory,type=some avg10=0,avg60=0,avg300=0 1642080601757545386\npressure,resource=io,type=some avg10=0,avg60=0,avg300=0 1642080601757564081\npressure,resource=memory,type=full avg60=0,avg300=0,avg10=0 1642080601757567428\npressure,resource=io,type=full avg60=0,avg300=0,avg10=0 1642080601757625827\n```\n\n## Building the binary\n\n1. Build the binary\n\n```\ngo build -o psi cmd/main.go\n```\n\n2. Copy the binary to desired location\n\n3. Adjust your telegraf.conf\n\n```\n[[inputs.execd]]\n  command = [\"/usr/local/bin/psi\"]\n  signal = \"none\"\n```\n\n4. Testing the output\n\nOn a linux machine the binary can be called and should output something like the [example output](#example-output).\n\n## Usage with docker\n\nIf you use telegraf with docker you can build your own telegraf image with a multi stage build and just add the binray to keep the image size small:\n\n\n```Dockerfile\n# Get repo\nFROM bitnami/git AS git-psi\nWORKDIR /app\nRUN git clone --depth 1 --branch v0.1.0 https://github.com/gridscale/linux-psi-telegraf-plugin.git linux-psi-telegraf-plugin\n\n# Build psi binary\nFROM golang:1.16-alpine AS binary-psi\nWORKDIR /go/src/app/\nCOPY --from=git-psi /app/ ./\nWORKDIR /go/src/app/linux-psi-telegraf-plugin\nRUN go build -o psi cmd/main.go\n\n# Build telegraf container\nFROM telegraf:alpine\n\nCOPY --from=binary-psi /go/src/app/linux-psi-telegraf-plugin/psi /usr/local/bin/psi\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgridscale%2Flinux-psi-telegraf-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgridscale%2Flinux-psi-telegraf-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgridscale%2Flinux-psi-telegraf-plugin/lists"}