{"id":13574000,"url":"https://github.com/ricoberger/script_exporter","last_synced_at":"2025-12-29T18:00:34.784Z","repository":{"id":36486607,"uuid":"144310404","full_name":"ricoberger/script_exporter","owner":"ricoberger","description":"Prometheus exporter to execute scripts and collect metrics from the output or the exit status.","archived":false,"fork":false,"pushed_at":"2025-09-03T04:40:40.000Z","size":435,"stargazers_count":416,"open_issues_count":3,"forks_count":90,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-09-03T06:21:06.445Z","etag":null,"topics":["docker","go","kubernetes","prometheus","prometheus-exporter","script","scripts"],"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/ricoberger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["ricoberger"],"custom":["https://www.paypal.me/ricoberger"]}},"created_at":"2018-08-10T16:39:57.000Z","updated_at":"2025-09-03T04:40:42.000Z","dependencies_parsed_at":"2023-02-19T10:46:05.508Z","dependency_job_id":"c7495752-71ad-4aec-8cc5-2225a6ff03c2","html_url":"https://github.com/ricoberger/script_exporter","commit_stats":{"total_commits":171,"total_committers":27,"mean_commits":6.333333333333333,"dds":0.52046783625731,"last_synced_commit":"0be64667e727e09bdc1738513c6aa4555161291c"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/ricoberger/script_exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricoberger%2Fscript_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricoberger%2Fscript_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricoberger%2Fscript_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricoberger%2Fscript_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricoberger","download_url":"https://codeload.github.com/ricoberger/script_exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricoberger%2Fscript_exporter/sbom","scorecard":{"id":775998,"data":{"date":"2025-08-11","repo":{"name":"github.com/ricoberger/script_exporter","commit":"165f1bb107694589b5a634cced4ca2dda3f4fd94"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Maintained","score":5,"reason":"6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/17 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/continuous-delivery.yaml:140","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yaml:15","Warn: no topLevel permission defined: .github/workflows/continuous-delivery.yaml:1","Warn: no topLevel permission defined: .github/workflows/continuous-integration.yaml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/release.yaml:10"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v3.0.1 not signed: https://api.github.com/repos/ricoberger/script_exporter/releases/213616310","Warn: release artifact v3.0.0 not signed: https://api.github.com/repos/ricoberger/script_exporter/releases/210784165","Warn: release artifact v2.24.3 not signed: https://api.github.com/repos/ricoberger/script_exporter/releases/210559786","Warn: release artifact v2.24.1 not signed: https://api.github.com/repos/ricoberger/script_exporter/releases/195514215","Warn: release artifact v3.0.1 does not have provenance: https://api.github.com/repos/ricoberger/script_exporter/releases/213616310","Warn: release artifact v3.0.0 does not have provenance: https://api.github.com/repos/ricoberger/script_exporter/releases/210784165","Warn: release artifact v2.24.3 does not have provenance: https://api.github.com/repos/ricoberger/script_exporter/releases/210559786","Warn: release artifact v2.24.1 does not have provenance: https://api.github.com/repos/ricoberger/script_exporter/releases/195514215"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:95: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:101: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:110: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:113: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:116: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:124: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:145: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-delivery.yaml:163: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-delivery.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-integration.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-integration.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-integration.yaml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-integration.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yaml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-integration.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-integration.yaml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-integration.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-integration.yaml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-integration.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-integration.yaml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/continuous-integration.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ricoberger/script_exporter/release.yaml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:8: pin your Docker image by updating alpine:3.22.0 to alpine:3.22.0@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  12 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/continuous-delivery.yaml:87"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T03:35:18.576Z","repository_id":36486607,"created_at":"2025-08-23T03:35:18.576Z","updated_at":"2025-08-23T03:35:18.576Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278891753,"owners_count":26063858,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docker","go","kubernetes","prometheus","prometheus-exporter","script","scripts"],"created_at":"2024-08-01T15:00:44.873Z","updated_at":"2025-12-29T18:00:34.777Z","avatar_url":"https://github.com/ricoberger.png","language":"Go","readme":"# Script Exporter\n\nThe Script Exporter is a [Prometheus](https://prometheus.io) exporter to execute\nscripts and collect metrics from the output or the exit status. The scripts to\nbe executed are defined via a configuration file. In the configuration file\nseveral scripts can be specified. The script which should be executed is\nindicated by a parameter in the scrap configuration. The output of the script is\ncaptured and is provided for Prometheus. Even if the script does not produce any\noutput, the exit status and the duration of the execution are provided.\n\n## Building and Running\n\nTo run the Script Exporter you can use the one of the binaries from the\n[release](https://github.com/ricoberger/script_exporter/releases) page or the\n[Docker image](https://github.com/ricoberger/script_exporter/pkgs/container/script_exporter).\nYou can also build the Script Exporter by yourself by running the following\ncommands:\n\n```sh\ngit clone https://github.com/ricoberger/script_exporter.git\ncd script_exporter\nmake build\n```\n\nAfterwards you can run the Script Exporter with the\n[example configuration](./scripts.yaml), by using the following command:\n\n```sh\n./bin/script_exporter\n```\n\nTo run the examples via Docker or Docker Compose the following commands can be\nused. The Docker Compose setup will also start a Prometheus instance with a\n[scrape configuration](./prometheus.yaml) for all scripts.\n\n```sh\n# Docker\ndocker build -f ./Dockerfile -t ghcr.io/ricoberger/script_exporter:latest .\ndocker run --rm -it --name script_exporter -p 9469:9469 -v $(pwd)/scripts.yaml:/script_exporter/scripts.yaml -v $(pwd)/prober/scripts:/script_exporter/prober/scripts ghcr.io/ricoberger/script_exporter:latest\n\n# Docker Compose\ndocker compose -f docker-compose.yaml up --build --force-recreate\n```\n\nThen visit [http://localhost:9469](http://localhost:9469) in the browser of your\nchoice. There you have access to the following examples:\n\n- [output](http://localhost:9469/probe?script=output): Parses the returned\n  output from the script and only return valid Prometheus metrics.\n- [ping](http://localhost:9469/probe?script=ping\u0026prefix=test\u0026params=target\u0026target=example.com):\n  Pings the specified address in the `target` parameter and returns if it was\n  successful or not.\n- [showtimeout](http://localhost:9469/probe?script=showtimeout\u0026timeout=42):\n  Reports whether or not the script is being run with a timeout from Prometheus,\n  and what it is.\n- [docker](http://localhost:9469/probe?script=docker): Example using\n  `docker exec` to return the number of files in a Docker container.\n- [sleep](http://localhost:9469/probe?script=sleep\u0026params=seconds\u0026seconds=20):\n  Execute a script, which executes a `sleep` command with the duration provided\n  in the `seconds` parameter. The command will be canceled after 10 seconds.\n- [cache](http://localhost:9469/probe?script=cache\u0026params=seconds\u0026seconds=5):\n  Execute a script, which executes a `sleep` command with the duration provided\n  in the `seconds` parameter. The output of the script will be cached for 60\n  seconds, so that follow up requests will be faaster.\n- [nagios](http://localhost:9469/probe?script=nagios): Parses the output of a\n  Nagios plugin and returns the relevant Prometheus metrics.\n\nYou can also deploy the Script Exporter to Kubernetes via Helm:\n\n```sh\nhelm upgrade --install script-exporter oci://ghcr.io/ricoberger/charts/script-exporter --version \u003cVERSION\u003e\n```\n\n## Usage and Configuration\n\nThe Script Exporter is configured via a configuration file and command-line\nflags (such as what configuration file to load, what port to listen on, and the\nlogging format and level).\n\nThe Script Exporter can reload its configuration file at runtime. If the new\nconfiguration is not well-formed, the changes will not be applied. A\nconfiguration reload is triggered by sending a `SIGHUP` to the Script Exporter\nprocess or by sending a HTTP POST request to the `/-/reload` endpoint.\n\n### Command-Line Flags\n\n```plaintext\nusage: script_exporter [\u003cflags\u003e]\n\n\nFlags:\n  -h, --[no-]help                Show context-sensitive help (also try --help-long and --help-man).\n      --config.files=\"scripts.yaml\"\n                                 Configuration files. To specify multiple configuration files glob patterns can be used.\n      --config.reload-interval=1h\n                                 Reload interval of the configuration file.\n      --[no-]config.check        If true, validate the configuration files and then exit.\n      --[no-]log.env             If true, environment variables passed to a script will be logged.\n      --[no-]script.no-args      Restrict script to accept arguments.\n      --script.timeout-offset=0.5\n                                 Offset to subtract from timeout in seconds.\n      --web.external-url=\u003curl\u003e   The URL under which Script Exporter is externally reachable (for example, if Script Exporter is served via a reverse proxy). Used for generating relative and absolute links back to Script Exporter itself. If the URL has a path portion, it will be used to prefix all HTTP endpoints served by Script Exporter. If omitted, relevant URL components\n                                 will be derived automatically.\n      --web.route-prefix=\u003cpath\u003e  Prefix for the internal routes of web endpoints. Defaults to path of --web.external-url.\n      --discovery.host=\"\"        Host for service discovery.\n      --discovery.port=\"\"        Port for service discovery.\n      --discovery.scheme=\"\"      Scheme for service discovery.\n      --web.listen-address=:9469 ...\n                                 Addresses on which to expose metrics and web interface. Repeatable for multiple addresses. Examples: `:9100` or `[::1]:9100` for http, `vsock://:9100` for vsock\n      --web.config.file=\"\"       Path to configuration file that can enable TLS or authentication. See: https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md\n      --log.level=info           Only log messages with the given severity or above. One of: [debug, info, warn, error]\n      --log.format=logfmt        Output format of log messages. One of: [logfmt, json]\n      --[no-]version             Show application version.\n```\n\n### Configuration File\n\nThe scripts for the Script Exporter can be configured via multiple configuration\nfiles. The configuration files can be set via the `--config.files` command-line\nflag. To split the scripts accross multiple configuration files a glob pattern\ncan be used, e.g. `--config.files=./scripts/*.yaml`.\n\n```yaml\nscripts:\n  - # The name of the script. To run the selected script within a probe the\n    # \"script\" parameter must be set in the Prometheus scrape configuration.\n    name: \u003cstring\u003e\n    # The command which should be run. This could be the path to a shell script\n    # or any other valid command which is available within your system.\n    command:\n      - \u003cstring\u003e\n    # Additional arguments which should be passed to the command. The arguments\n    # are passed to the command first, afterwards all additional arguments\n    # specified by the \"params\" parameter from the Prometheus scrape config are\n    # passed to the command: \"\u003cCOMMAND\u003e [\u003cARGUMENTS\u003e] [\u003cPARAMS\u003e]\".\n    args:\n      - \u003cstring\u003e\n    # All additional environment variables which should be passed to the script,\n    # besides the globally defined environment variables on the system, where\n    # Script Exporter is running.\n    #\n    # The parameters defined via the \"params\" query parameter are also passed to\n    # script as environemnt variables. If an environemnt variable with the same\n    # name as a parameter is already defined it will not be overwritten, unless\n    # the \"allow_env_overwrites\" options is set to \"true\".\n    env:\n      \u003cstring\u003e: \u003cstring\u003e\n    allow_env_overwrite: \u003cboolean\u003e\n    # If set to \"true\" the command will be executed with privileged (root)\n    # permissions by executing the \"command\" with a pre-fixed \"sudo\":\n    # \"sudo \u003cCOMMAND\u003e [\u003cARGUMENTS\u003e] [\u003cPARAMS\u003e]\"\n    #\n    # Note that you still need to create the relevant sudoers entries, Script\n    # Exporter will not do this for you.\n    sudo: \u003cboolean\u003e\n    # By default the output of a script will be checked for valid Prometheus\n    # metrics. These metrics will be exported in addition to the default script\n    # metrics.\n    output:\n      # If set to \"true\" the output of a script will be ignored and only the\n      # default metrics will be exported.\n      ignore: \u003cboolean\u003e\n      # If set to \"true\" the output of a script will be ignored if the script\n      # returned an error and only the default metrics will be exported.\n      ignore_on_error: \u003cboolean\u003e\n      # The output format of the script. By default the exporter expects valid\n      # Prometheus metrics.\n      #\n      # Possible values are \"prometheus\" and \"nagios\".\n      format: \u003cstring\u003e\n    # Timeout configuration for the script. By default the timeout specified via\n    # the \"timeout\" parameter or the \"scrape_timeout\" Prometheus configuration\n    # will be used.\n    #\n    # We add the offset defined via the \"--script.timeout-offset\" command-line\n    # flag to these timeouts.\n    #\n    # This information is made available to scripts through the environment\n    # variables \"$SCRIPT_TIMEOUT\" and \"$SCRIPT_DEADLINE\". The first is the\n    # timeout in seconds (including a fractional part) and the second is the\n    # Unix timestamp when the deadline will expire (also including a fractional\n    # part).\n    timeout:\n      # Set a max timeout in seconds. If the Prometheus specific timeout is\n      # larger then the max timeout, the max timeout will be used.\n      max_timeout: \u003cfloat\u003e\n      # If set to \"true\" the timeout will be enforced, otherwise the script will\n      # continue with running, also when the timeout is passed.\n      enforced: \u003cboolean\u003e\n      # Set a wait delay in seconds.\n      #\n      # If the script spawns a child process (e.g. \"sleep\") the timeout might\n      # not be enforced, because Go waits for the timeout and the closing of all\n      # I/O pipes. To enforce the timeout for such cases the \"wait_delay\" must\n      # be set to a low value (e.g. \"0.01\")\n      wait_delay: \u003cfloat\u003e\n    # By default the result of a script execution will not be cached. To reuse\n    # the result from one scrape in a follow up scrape the \"duration\" must be\n    # set.\n    #\n    # Note: The cache is not presisted, which means that the cache is deleted,\n    # if the Script Exporter is restarted.\n    cache:\n      # Cache duration in seconds. If this is set, the result of a script\n      # execution will be returned from the cache instead of running the script\n      # again.\n      duration: \u003cfloat\u003e\n      # If set to \"true\" also the result of a script execution which returned an\n      # error will be cached.\n      cache_on_error: \u003cboolean\u003e\n      # If set to \"true\" the result from the cache will be returned, when the\n      # script returned an error, also when the cache entry is already expired.\n      use_expired_cache_on_error: \u003cboolean\u003e\n    # Configuration for the Prometheus discovery.\n    discovery:\n      # A list of parameters which will be passed to the script and within the\n      # \"params\" query parameter.\n      params:\n        \u003cstring\u003e: \u003cstring\u003e\n      # The scrape interval and scrape timeout which should be used by\n      # Prometheus for the discovered script. If not set the global scrape\n      # interval and timeout will be used.\n      scrape_interval: \u003cduration\u003e\n      scrape_timeout: \u003cduration\u003e\n```\n\n### TLS and Basic Authentication\n\nThe Script Exporter supports TLS and basic authentication. This enables better\ncontrol of the various HTTP endpoints. To use TLS and/or basic authentication,\nyou need to pass a configuration file using the `--web.config.file` parameter.\nThe format of the file is described\n[in the exporter-toolkit repository](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md).\n\nNote that the TLS and basic authentication settings affect all HTTP endpoints:\n`/metrics` for scraping, `/probe` for probing, and the web UI.\n\n### Prometheus Configuration\n\nAn example configuration for Prometheus can be found in the\n[prometheus.yaml](./prometheus.yaml) file, which contains one job for each\nexample script, a job to scrape the Script Exporter metrics and a job to use the\nPrometheus discovery feature of the script exporter.\n\n```yaml\nscrape_configs:\n  # Scrape configuration for all of the example scripts.\n  - job_name: showtimeout\n    metrics_path: /probe\n    params:\n      script:\n        - showtimeout\n    static_configs:\n      - targets:\n          - localhost:9469\n\n  # Configuration to get the metrics of the Script Exporter.\n  - job_name: \"script_exporter\"\n    metrics_path: /metrics\n    static_configs:\n      - targets:\n          - localhost:9469\n\n  # Configuration for the Prometheus discovery feature of the Script Exporter.\n  - job_name: scripts\n    http_sd_configs:\n      - url: http://localhost:9469/discovery\n```\n\nBy default the Script Exporter will use the host, port and scheme used by\nPrometheus when creating the targets for the Prometheus discovery. If you want\nto overwrite the host, port and scheme the `--discovery.host`,\n`--discovery.port` and `--discovery.scheme` command-line flags can be set.\n","funding_links":["https://github.com/sponsors/ricoberger","https://www.paypal.me/ricoberger"],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricoberger%2Fscript_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricoberger%2Fscript_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricoberger%2Fscript_exporter/lists"}