{"id":16283233,"url":"https://github.com/secustor/prometheus-nagios-exporter","last_synced_at":"2025-04-08T18:24:25.229Z","repository":{"id":46160037,"uuid":"238679577","full_name":"secustor/prometheus-nagios-exporter","owner":"secustor","description":"🆙 Prometheus exporter that scrapes a Nagios status page for alerts.","archived":false,"fork":false,"pushed_at":"2023-11-13T20:14:50.000Z","size":3818,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T14:31:29.253Z","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/secustor.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-06T12:04:46.000Z","updated_at":"2023-11-13T20:14:55.000Z","dependencies_parsed_at":"2024-11-05T08:42:12.929Z","dependency_job_id":"c6ac915c-35a8-4615-9852-390a307382dd","html_url":"https://github.com/secustor/prometheus-nagios-exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secustor%2Fprometheus-nagios-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secustor%2Fprometheus-nagios-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secustor%2Fprometheus-nagios-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secustor%2Fprometheus-nagios-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secustor","download_url":"https://codeload.github.com/secustor/prometheus-nagios-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247899480,"owners_count":21014906,"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-10-10T19:12:53.457Z","updated_at":"2025-04-08T18:24:25.176Z","avatar_url":"https://github.com/secustor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prometheus-nagios-exporter\n\n🆙 Prometheus exporter that scrapes a Nagios status pages for alerts.\n\nPrometheus asks this exporter for metrics, one Nagios target at a time.\n\nThe timeout for this exporter is 15 seconds, rather than the normal 10 seconds for Prometheus Exporters\n\n## Exported Metrics\n\n### `nagios_check_ok`\n\nLabels `host`, `check_id`, `state`, `notify`, `acknowledged`, type Gauge\n\nInfo about each Nagios host monitored, and whether they have a failing check (0 == failing check)\n\n### `nagios_request_duration_seconds`\n\nHow long the exporter took to scrape the Nagios hosts status?\n\n### `nagios_up`\n\nWhether the last nagios scrape was successful (1: up, 0: down).\n\n### Prometheus Configuration\n\n```yaml\n- job_name: nagios_exporter\n  scheme: https\n  static_configs:\n      - targets:\n            - prometheus-nagios-exporter-eu-west-1.in.ft.com\n            - prometheus-nagios-exporter-us-east-1.in.ft.com\n        labels:\n            system: prometheus-nagios-exporter\n            observe: yes\n\n# optional '__meta_nagios_param_host/__meta_nagios_param_hostgroup/__meta_nagios_param_servicegroup' labels passed to the nagios status page\n# useful when a host/hostgroup/servicegroup maps to a different label set on the same instance\n# multiple parameters are not supported and may produce unexpected results\n#\n# A further optional label is '__meta_nagios_param_protocol'. This labels allows to control the protocol which is used\n# to scrape the nagios instance. Valid values are `http` (default) and `https`.\n- job_name: nagios\n  scheme: https\n  metrics_path: /collect\n  scrape_timeout: 15s\n  static_configs:\n      - targets:\n            - 10.0.0.1\n        labels:\n            observe: yes\n            system: an-example-system-code\n      - targets:\n            - 10.0.0.2\n        labels:\n            observe: yes\n            system: an-example-system-code\n            __meta_nagios_param_host: specific-host-to-label\n      - targets:\n            - 10.0.0.2\n        labels:\n            observe: yes\n            system: an-example-system-code\n            __meta_nagios_param_host: other-host-to-label\n      - targets:\n            - 10.0.0.3\n        labels:\n            observe: yes\n            system: some-system-1\n            __meta_nagios_param_hostgroup: some-nagios-host-group\n      - targets:\n            - 10.0.0.4\n        labels:\n            observe: yes\n            system: some-system-2\n            __meta_nagios_param_servicegroup: some-nagios-service-group\n  relabel_configs:\n      - source_labels: [__address__]\n        regex: (.*?)[#?].*?\n        replacement: $1\n        target_label: __param_instance\n      - action: labelmap\n        regex: __meta_nagios_param_(.*)\n        replacement: __param_$1\n      - source_labels: [__param_instance]\n        target_label: instance\n      - target_label: __address__\n        replacement: prometheus-nagios-exporter.in.ft.com\n```\n\n## Runbook\n\nView [RUNBOOK.md](./RUNBOOK.md).\n\n## Development\n\n### Parameter\n\n| Parameter      | Shorthand | Environment variable | Default  | Description                                                                        |\n| -------------- | --------- | -------------------- | -------- | ---------------------------------------------------------------------------------- |\n| port           | p         | `PORT`               | `8080`   | The port which the service listens to HTTP connections over                        |\n| verbose        | v         | `VERBOSE`            | `false`  | Whether to enable verbose logging                                                  |\n| username       | U         | `USERNAME`           | `nil`    | Set username for basic auth at Nagios                                              |\n| password       | P         | `PASSWORD`           | `nil`    | Set password for basic auth at Nagios                                              |\n| insecure       | k         | `INSECURE`           | `false`  | Ignore TLS validation errors when calling Nagios                                   |\n| client-timeout | t         | `CLIENT_TIMEOUT`     | `60`     | Hard HTTP client timeout. This should be bigger then the Prometheus Timeout Header |\n| log-format     |           | `LOG_FORMAT`         | `logfmt` | Set the logging format. Available values `logfmt` and `json`                       |\n\n### Local Development\n\nUse the Makefile to locally test your changes. The 'make build' command will create a new local docker image, then the 'make run' command will execute these changes locally.\n\nGo to `http://localhost:8080/` (or the port specified on the `make run` command) on your browser to see the index page for the exporter.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecustor%2Fprometheus-nagios-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecustor%2Fprometheus-nagios-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecustor%2Fprometheus-nagios-exporter/lists"}