{"id":48367424,"url":"https://github.com/kodehat/netcupscp-exporter","last_synced_at":"2026-04-05T15:04:22.445Z","repository":{"id":331225388,"uuid":"1123725029","full_name":"kodehat/netcupscp-exporter","owner":"kodehat","description":"Prometheus Exporter for Netcup Server Control Panel (SCP)","archived":false,"fork":false,"pushed_at":"2026-03-29T10:57:36.000Z","size":236,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-29T13:51:35.662Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/kodehat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-27T13:40:31.000Z","updated_at":"2026-03-29T10:57:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kodehat/netcupscp-exporter","commit_stats":null,"previous_names":["kodehat/netcupscp-exporter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kodehat/netcupscp-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodehat%2Fnetcupscp-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodehat%2Fnetcupscp-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodehat%2Fnetcupscp-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodehat%2Fnetcupscp-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kodehat","download_url":"https://codeload.github.com/kodehat/netcupscp-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodehat%2Fnetcupscp-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31439444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T13:13:19.330Z","status":"ssl_error","status_checked_at":"2026-04-05T13:13:17.778Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-04-05T15:03:38.724Z","updated_at":"2026-04-05T15:04:22.440Z","avatar_url":"https://github.com/kodehat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netcupscp-exporter\n\nA small Prometheus exporter that exports metrics about servers from Netcup SCP (server control panel).\n\n[![Sonar quality gate](https://sonarcloud.io/api/project_badges/measure?project=kodehat_netcupscp-exporter\u0026metric=alert_status)](https://sonarcloud.io/project/overview?id=kodehat_netcupscp-exporter) ![GitHub stars](https://img.shields.io/github/stars/kodehat/netcupscp-exporter) ![Go version](https://img.shields.io/github/go-mod/go-version/kodehat/netcupscp-exporter) [![Docker image size](https://img.shields.io/docker/image-size/codehat/netcupscp-exporter)](https://hub.docker.com/r/codehat/netcupscp-exporter)\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Metrics](#metrics)\n- [Docker](#docker)\n- [Development](#development)\n- [License](#license)\n\n## Features\n\n- Exposes Prometheus metrics for Netcup SCP resources\n- Periodically refreshes data and updates metrics\n- Automatic refresh of used access token\n- Lightweight Go binary with optional Docker image\n\n## Installation\n\nBuild the binary with Go (Go 1.25+ recommended):\n\n```sh\ngo mod download\ngo build -o netcupscp-exporter ./\n```\n\n## Usage\n\nRun the exporter with flags or environment variables. For example:\n\n```sh\n# Using flags\n./netcupscp-exporter --port=2008 --refresh-token=\u003ctoken\u003e --log-level=debug\n\n# Or using environment variables\nPORT=2008 REFRESH_TOKEN=\u003ctoken\u003e ./netcupscp-exporter\n```\n\nSee the available flags in the source (`main.go` and the `flags` package).\n\n## Configuration\n\nConfiguration can be provided via environment variables or command-line flags. Flags override environment variables when both are provided.\n\nEnvironment variables (defaults shown):\n\n- `HOST` — host to bind the HTTP server to (default: all interfaces / empty)\n- `PORT` — port to bind the HTTP server to (default: `2008`)\n- `REFRESH_TOKEN` — Netcup SCP refresh token (default: empty)\n- `REVOKE_TOKEN` — set to `true` to revoke the given refresh token and exit (default: `false`)\n- `GET_TOKEN_DETAILS` — set to `true` to print details about the refresh token and exit (default: `false`)\n- `LOG_LEVEL` — logging level (default: `info`; options: `debug`, `info`, `warn`, `error`)\n- `LOG_JSON` — set to `true` to enable JSON formatted logging (default: `false`)\n\nCommand-line flags (override env vars):\n\n- `--host` string (bind host)\n- `--port` string (bind port)\n- `--refresh-token` string (Netcup SCP refresh token)\n- `--revoke-token` bool (revoke refresh token and exit)\n- `--get-token-details` bool (print token details and exit)\n- `--log-level` string (logging level)\n- `--log-json` bool (enable JSON logging)\n\n## Metrics\n\nThe exporter exposes Prometheus metrics (HTTP) on the configured address and path (commonly `/metrics`). Configure Prometheus to scrape the exporter endpoint.\n\n**Collected metrics** (prometheus names prefixed with `ncscp_`):\n\n- **ncscp_build_info**: gauge — constant `1` labeled by `goversion`, `revision`, `version`.\n- **ncscp_cpu_cores**: gauge — number of CPU cores; labels: `servername`, `servernickname`.\n- **ncscp_memory_bytes**: gauge — amount of memory in bytes; labels: `servername`, `servernickname`.\n- **ncscp_monthlytraffic_in_bytes**: gauge — monthly incoming traffic in bytes; labels: `servername`, `servernickname`, `month`, `year`, `mac`.\n- **ncscp_monthlytraffic_out_bytes**: gauge — monthly outgoing traffic in bytes; labels: `servername`, `servernickname`, `month`, `year`, `mac`.\n- **ncscp_monthlytraffic_total_bytes**: gauge — total monthly traffic in bytes; labels: `servername`, `servernickname`, `month`, `year`, `mac`.\n- **ncscp_server_start_time_seconds**: gauge — server start time (seconds since epoch); labels: `servername`, `servernickname`.\n- **ncscp_ip_info**: gauge — IP addresses assigned to a server; labels: `servername`, `servernickname`, `mac`, `ip`, `type`.\n- **ncscp_interface_throttled**: gauge — interface throttled (1) or not (0); labels: `servername`, `servernickname`, `mac`, `status`.\n- **ncscp_server_status**: gauge — online (1) / offline (0); labels: `servername`, `servernickname`, `status`.\n- **ncscp_rescue_active**: gauge — rescue system active (1) / inactive (0); labels: `servername`, `servernickname`, `status`.\n- **ncscp_reboot_recommended**: gauge — reboot recommended (1) / not (0); labels: `servername`, `servernickname`, `status`.\n- **ncscp_disk_capacity_bytes**: gauge — available storage space in bytes; labels: `servername`, `servernickname`, `driver`, `name`.\n- **ncscp_disk_used_bytes**: gauge — used storage space in bytes; labels: `servername`, `servernickname`, `driver`, `name`.\n- **ncscp_disk_optimization**: gauge — optimization recommended (1) / not (0); labels: `servername`, `servernickname`, `status`.\n\n## Docker\n\nYou can build a Docker image using the provided `Dockerfile` and run it passing environment variables or flags:\n\n```sh\ndocker build -t codehat/netcupscp-exporter:local .\ndocker run --rm -e REFRESH_TOKEN=\u003ctoken\u003e -p 2008:2008 codehat/netcupscp-exporter:local\n```\n\nAdjust ports and environment variables to your environment.\n\n## Development\n\n- Install dependencies: `go mod download`\n- Run the exporter locally: `go run ./...`\n\nYou can regenerate Netcup SCP client code with `client/generate.go` file.\n\n## License\n\n[MIT](https://www.tldrlegal.com/license/mit-license)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkodehat%2Fnetcupscp-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkodehat%2Fnetcupscp-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkodehat%2Fnetcupscp-exporter/lists"}