{"id":21754388,"url":"https://github.com/immstudios/promexp","last_synced_at":"2025-04-13T09:08:45.634Z","repository":{"id":57455075,"uuid":"331914354","full_name":"immstudios/promexp","owner":"immstudios","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-17T13:55:21.000Z","size":55,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T09:08:39.169Z","etag":null,"topics":["casparcg","devops","linux","metrics","prometheus-exporter","prometheus-metrics","psutil","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","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/immstudios.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}},"created_at":"2021-01-22T10:37:22.000Z","updated_at":"2023-11-02T15:41:27.000Z","dependencies_parsed_at":"2022-09-10T00:40:17.224Z","dependency_job_id":null,"html_url":"https://github.com/immstudios/promexp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immstudios%2Fpromexp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immstudios%2Fpromexp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immstudios%2Fpromexp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immstudios%2Fpromexp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/immstudios","download_url":"https://codeload.github.com/immstudios/promexp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688565,"owners_count":21145766,"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":["casparcg","devops","linux","metrics","prometheus-exporter","prometheus-metrics","psutil","windows"],"created_at":"2024-11-26T09:13:51.677Z","updated_at":"2025-04-13T09:08:45.613Z","avatar_url":"https://github.com/immstudios.png","language":"Python","readme":"# promexp\n\nPromexp is a stand-alone service (Windows/Linux), which acts as a simplified replacement of Prometheus node exporter.\nAlong with basic system metrics, it provides information useful in a broadcast environment. \n\nConfiguration\n-------------\n\nMost of the features should work out of the box, but you may tweak the settings using a `settings.json`\nfile stored in the same directory as the application. All of the variables are optional.\n\n```json\n{\n    \"host\" : \"localhost\",\n    \"port\" : 8080,\n    \"hostname\" : \"thismachinehasanothername\",\n    \"prefix\" : \"system\",\n    \"tags\" : {\n        \"site_name\" : \"TV1\"\n    },\n    \"provider_settings\" : {}\n}\n```\n\n### Listening address\n\nBy default, the built-in HTTP server listens on all interfaces on port 9731.\nWhen needed, you may override this using `host` and `port` variables.\n\n### Hostname\n\nThe software automatically attaches a `hostname` tag to each published metrics.\nYou may disable this behavior by setting the `hostname` variable to `null` or \noverride the machine name by setting it to a string value. \n\n\n### Prefix\n\nBy default, all metric names are prefixed with the string `nebula_`. \nIt is possible to change the prefix by setting the `prefix` to a string value. \nA trailing underscore of the prefix is added automatically.\n\n### Additional tags\n\nUsing the `tags` dictionary, you may specify additional tags to be appended to each metric.\nFor example to create a server group or specify a client name in a multitenant environment.\n\nProviders\n---------\n\nEach provider returns a set of metrics. By default, all providers are enabled, when supported on the platform.\nYou may explicitly disable a provider by setting its configuration to `null`:\n\n```json\n{\n   \"provider_settings\" : {\n       \"nvidia\" : null,\n       \"casparcg\" : {\"host\" : \"10.0.1.15\"}\n   } \n}\n```\n\n\n### psutil\n\nThis provider returns basic machine metrics such as CPU and RAM usage.\n\nName                 | Type    | Unit    | Description\n---------------------|---------|---------|-------------\n`uptime_seconds`     | counter | seconds | ...\n`cpu_usage`          | gauge   | percent | ...\n`memory_bytes_total` | gauge   | bytes   | ...\n`memory_bytes_free`  | gauge   | bytes   | ...\n`memory_usage`       | gauge   | percent | ...\n`swap_bytes_total`   | gauge   | bytes   | ...\n`swap_bytes_free`    | gauge   | bytes   | ...\n`swap_usage`         | gauge   | percent | ...\n`disk_read_bytes`    | counter | bytes   | ...\n`disk_write_bytes`   | counter | bytes   | ...\n\n### network\n\n#### Settings\n\nName              | Type    | Default | Description\n------------------|---------|---------|------------\n`ignore_inactive` | boolean | `true`  | Do not export metrics for interfaces without traffic\n\n#### Exported metrics\n\nName                       | Type    | Unit  | Description\n---------------------------|---------|-------|-------------\n`network_sent_bytes_total` | Counter | bytes | ...\n`network_recv_bytes_total` | Counter | bytes | ...\n\n### nvidia\n\nUses `nvidia-smi` to obtain and return metrics of NVIDIA GPUs\n\n#### Settings\n\nName       | Type   | Default             | Description\n-----------|--------|---------------------|------------\n`smi_path` | string | `null` (autodetect) | Path to the `nvidia-smi` application binary\n\n#### Exported metrics\n\nName              | Type  | Unit           | Description\n------------------|-------|----------------|-------------\n`gpu_usage`       | gauge | percent        | Current utilization of the GPU core\n`gpu_memory`      | gauge | percent        | Current GPU RAM usage\n`gpu_encoder`     | gauge | percent        | Utilization of the nvenc video encoder\n`gpu_decoder`     | gauge | percent        | Utilization of the nvdec video decoder\n`gpu_fan_speed`   | gauge | percent        | Current fan speed\n`gpu_temperature` | gauge | Degree Celsius | GPU core temperature \n`gpu_power_draw`  | gauge | Watt           | Current power consumption of the card\n\n### storage\n\nReturns storage utilization information for each mountpoint/drive.\n\n#### Exported metrics\n\nName | Type | Unit | Description\n-----|------|------|-------------\n`storage_bytes_total` | gauge | bytes   | ...\n`storage_bytes_free`  | gauge | bytes   | ...\n`storage_usage`       | gauge | percent | ...\n\n### storagespaces\n\nOn Windows, this provider shows a health status of each configured storage space.\n\n#### Exported metrics\n\nName                  | Type  | Unit    | Description\n----------------------|-------|---------|-------------\nstorage_space_healthy | gauge | boolean | While `1` indicates nominal status, `0` indicates a problem (typically a degraded array)\n\n`storage_space_healthy` metric contains two tags `name` and `mode`, which may be used for filtering.\n\n### casparcg\n\n#### Settings\n\nName       | Type    | Default       | Description\n-----------|---------|---------------|------------\n`host`     | string  | `\"127.0.0.1\"` | IP address or a hostname of the target CasparCG instance\n`port`     | integer | `5250`        | AMCP port of the target CasparCG instance\n`osc_port` | integer | `6250`        | OSC listening port (server listens on all interfaces)\n`force`    | boolean | `false`       | Do not disable the provider when CasparCG is not available during startup (keep retrying to connect)\n`heartbeat_interval` | float | `10`  | Number of seconds after which the provider sends a heartbeat `VERSION` command\n\n\n#### Exported metrics\n\nName                    | Type    | Unit    | Description\n------------------------|---------|---------|-------------\ncasparcg_connected      | Gauge   | boolean | Returns `1` when CasparCG connection is estabilished\ncasparcg_idle_seconds   | Gauge   | seconds | Time elapsed since last OSC message. Shouldn't be much higher than 1/FPS\ncasparcg_dropped_total  | Counter | none    | A number of dropped frames per channel since the application started\ncasparcg_peak_volume    | Gauge   | Percent | Audio peak value per channel since the last request\n\n`casparcg_peak_volume` may either help you determine whether the channel playback is stalled \n(assuming audio should always play, you may check for zero values)\nor to find out there is an audio channel with a posibility of clipping audio (check for 100%).\n\n`casparcg_dropped_frames` metric is not available with CasparCG \u0026gt;2.2\n\nBuilding on Windows\n-------------------\n\nWe use Nuitka to build the application. You may as well:\n\n 1. Download and install [Python 3.8](https://www.python.org/ftp/python/3.8.7/python-3.8.7-amd64.exe) (any version \u0026gt;3.6 should work should work)\n 2. When asked, select \"install for all users\" and \"install pip\"\n 3. Start a terminal (cmd) as an administrator\n 4. Run `pip install psutil nuitka nxtools`\n 5. Install [MinGW](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download)\n 6. Create an environment variable called `CC` containing a path to `gcc.exe` binary from the MinGW package \n 7. Run `build.bat` from the `promexp` directory\n 8. After a while, resulting binary should be located in `promexp.dist`\n\n\nAcknowledgements\n----------------\n\n### Prometheus\n\nThanks to [Prometheus](https://prometheus.io) developers for their great work!\n\n### psutil\n\nAs a system metrics source, [psutil](https://github.com/giampaolo/psutil) module by giampaolo is used.\n\n### python-osc\n\nCasparCG provider uses public domain [python-osc](https://github.com/attwad/python-osc) module by attwad.\n\n### nuitka\n\nWindows binary is built using [nuitka](https://nuitka.net).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmstudios%2Fpromexp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimmstudios%2Fpromexp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmstudios%2Fpromexp/lists"}