{"id":23380575,"url":"https://github.com/flix-tech/prometheus-certificate-exporter","last_synced_at":"2025-09-08T15:38:08.284Z","repository":{"id":56633268,"uuid":"183263255","full_name":"flix-tech/prometheus-certificate-exporter","owner":"flix-tech","description":"Prometheus exporter for x509 certificates","archived":false,"fork":false,"pushed_at":"2020-10-27T21:41:48.000Z","size":29,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-14T04:51:11.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flix-tech.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":"2019-04-24T16:05:22.000Z","updated_at":"2020-05-29T08:39:11.000Z","dependencies_parsed_at":"2022-08-15T22:20:21.704Z","dependency_job_id":null,"html_url":"https://github.com/flix-tech/prometheus-certificate-exporter","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flix-tech%2Fprometheus-certificate-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flix-tech%2Fprometheus-certificate-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flix-tech%2Fprometheus-certificate-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flix-tech%2Fprometheus-certificate-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flix-tech","download_url":"https://codeload.github.com/flix-tech/prometheus-certificate-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801198,"owners_count":20998331,"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-12-21T20:16:49.432Z","updated_at":"2025-04-08T07:43:02.087Z","avatar_url":"https://github.com/flix-tech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prometheus-certificate-exporter\n\nPrometheus exporter for x509 certificates. Requires python \u003e= 3.5.\n\n```\nusage: main.py [-h] --path PATH --certificate-suffix CERTIFICATE_SUFFIX\n               [--certificate-exclude-regex CERTIFICATE_EXCLUDE_REGEX]\n               [--log-level LOG_LEVEL] [--port PORT]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --path PATH           Path in which to look for certificates. If it's a\n                        directory will look for files inside it. If it's a\n                        file it will check it ignoring filename suffix\n                        matching and exclusion (files are not constrained by\n                        --certificate-suffix and --certificate-exclude-regex\n                        options)\n  --certificate-suffix CERTIFICATE_SUFFIX\n                        Suffix to match against, when looking for certificates\n  --certificate-exclude-regex CERTIFICATE_EXCLUDE_REGEX\n                        Regex to match against cert names. Matching filenames\n                        will be ignored. Optional.\n  --log-level LOG_LEVEL\n                        Set the logging level. Defaults to INFO.\n  --port PORT           Port the exporter will listen on.\n```\n\nExported metrics:\n- `ssl_certificate_begin_validity_timestamp`: timestamp on which the certificate will begin to be valid,\nexpressed in seconds from epoch (January 1, 1970).\n    * `path`: the path at which the certificate the metric refers to is.\n    * `issuer`: the signer CA name.\n    * `subjects`: the semicolon-separated list of all the DNS names whose usage is allowed by the cert.\n- `ssl_certificate_end_validity_timestamp`: timestamp on which the certificate will cease to be valid,\nexpressed in seconds from epoch (January 1, 1970, 00:00). Labels are the same as\n`ssl_certificate_begin_validity_timestamp`.\n- `certificateexporter_load_error`: one . Labels:\n    * `path`: the path at which the certificate the metric refers to is.\n\n\n\n##### Requirements\n\nThis application depends on the following python libraries:\n- `cryptography`\n- `prometheus_client`\n\nThese requirements may be satisfied in any of the following ways:\n- By using pip: `pip install -r requirements.txt`.\n- If you're running ubuntu/debian, you can use the distro-provided\n packages: `apt install -y python3-cryptography python3-prometheus-client`. (see FAQ)\n- Using other means, like venvs, manual installations, etc.\n\nThe application can then be launched by running `main.py`.\n\n\n\n### F.A.Q.\n\n###### I installed the distro-provided packages, but importing the packages fails with `ImportError: No module named 'python_client'`\n\nIt's possible that your distribution's installation path (e.g. `/usr/lib/python3/dist-packages` on debian-stretch)\nis not included in the `sys.path` of your running python's  instance. This is for example the case of official\npython docker images.\n\nIf that path is missing, you can enable its inclusion by setting the `PYTHONPATH` environment variable:\n`PYTHONPATH=/usr/lib/python3/dist-packages ./main.py`\n\n\n\n### Future work\n\n- Build docker image\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflix-tech%2Fprometheus-certificate-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflix-tech%2Fprometheus-certificate-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflix-tech%2Fprometheus-certificate-exporter/lists"}