{"id":37124612,"url":"https://github.com/morfien101/chef-waiter","last_synced_at":"2026-01-14T14:24:23.049Z","repository":{"id":48857174,"uuid":"147301437","full_name":"morfien101/chef-waiter","owner":"morfien101","description":"Wrapper for Chef Infra to allow on demand jobs","archived":false,"fork":false,"pushed_at":"2022-04-05T16:37:39.000Z","size":20799,"stargazers_count":3,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-19T06:51:03.125Z","etag":null,"topics":["chef","chef-client","chef-push-jobs","chef-service","chef-waiter","demand-runs","go","locking","periodic-runs"],"latest_commit_sha":null,"homepage":"","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/morfien101.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":"2018-09-04T06:54:49.000Z","updated_at":"2022-04-05T16:37:43.000Z","dependencies_parsed_at":"2022-09-03T14:21:55.123Z","dependency_job_id":null,"html_url":"https://github.com/morfien101/chef-waiter","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/morfien101/chef-waiter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morfien101%2Fchef-waiter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morfien101%2Fchef-waiter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morfien101%2Fchef-waiter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morfien101%2Fchef-waiter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morfien101","download_url":"https://codeload.github.com/morfien101/chef-waiter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morfien101%2Fchef-waiter/sbom","scorecard":{"id":660010,"data":{"date":"2025-08-11","repo":{"name":"github.com/morfien101/chef-waiter","commit":"46cb13c06f9dab86f031a7e5d3c541f6165e37c9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Code-Review","score":0,"reason":"Found 1/29 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":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: artifacts/chef-waiter-linux-amd64-v1.3.3/chef-waiter:1","Warn: binary detected: artifacts/chef-waiter-windows-amd64-v1.3.3/chef-waiter.exe:1"],"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":"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":"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":"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":"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 v1.4.3 not signed: https://api.github.com/repos/morfien101/chef-waiter/releases/20730991","Warn: release artifact v1.4.2 not signed: https://api.github.com/repos/morfien101/chef-waiter/releases/20713978","Warn: release artifact v1.4.1 not signed: https://api.github.com/repos/morfien101/chef-waiter/releases/20587171","Warn: release artifact v1.3.2 not signed: https://api.github.com/repos/morfien101/chef-waiter/releases/20584628","Warn: release artifact v1.3.1+travis58 not signed: https://api.github.com/repos/morfien101/chef-waiter/releases/16202755","Warn: release artifact v1.4.3 does not have provenance: https://api.github.com/repos/morfien101/chef-waiter/releases/20730991","Warn: release artifact v1.4.2 does not have provenance: https://api.github.com/repos/morfien101/chef-waiter/releases/20713978","Warn: release artifact v1.4.1 does not have provenance: https://api.github.com/repos/morfien101/chef-waiter/releases/20587171","Warn: release artifact v1.3.2 does not have provenance: https://api.github.com/repos/morfien101/chef-waiter/releases/20584628","Warn: release artifact v1.3.1+travis58 does not have provenance: https://api.github.com/repos/morfien101/chef-waiter/releases/16202755"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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":"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"}}]},"last_synced_at":"2025-08-21T15:49:59.363Z","repository_id":48857174,"created_at":"2025-08-21T15:49:59.363Z","updated_at":"2025-08-21T15:49:59.363Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28422892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["chef","chef-client","chef-push-jobs","chef-service","chef-waiter","demand-runs","go","locking","periodic-runs"],"created_at":"2026-01-14T14:24:22.280Z","updated_at":"2026-01-14T14:24:23.037Z","avatar_url":"https://github.com/morfien101.png","language":"Go","readme":"# Chef Waiter\r\n\r\n[![Build Status](https://travis-ci.org/morfien101/chef-waiter.svg?branch=master)](https://travis-ci.org/morfien101/chef-waiter)\r\n\r\nA simple HTTP(S) API wrapper around chef client.\r\n\r\n[What is the Chef Waiter](#what-is-the-chef-waiter)\r\n\r\n[How do I use Chef Waiter](#how-do-i-use-chef-waiter)\r\n\r\n[Installing](#installing)\r\n\r\n[Running](#running)\r\n\r\n[Configuration File](#configuration-file)\r\n\r\n[Maintenance mode](#maintenance-mode)\r\n\r\n[Locking the chef Waiter](#locking-the-chef-waiter)\r\n\r\n[Chef service replacement](#chef-service-replacement)\r\n\r\n[Example Flow](#example-flow)\r\n\r\n[Logging](#logging)\r\n\r\n[Metrics](#metrics)\r\n\r\n![waiter](./README/waiter_T.png \"chef waiter\")\r\n\r\n## What is the Chef Waiter\r\n\r\nThe Chef Waiter service was created to enable on demand runs of chef without the use of push jobs.\r\nPush jobs are not available when using the managed chef service from opscode.\r\n\r\nThis leaves you in a situation that you have to run chef __very__ frequently or just wait for changes to roll out. This poses an issue on CD pipelines as the CD pipeline is non-deterministic. With out knowing if a chef run passes or fails you don't know if the deploy worked.\r\n\r\n## I just use SSH or Winrm, so why do I need this?\r\n\r\nUsing SSH and WinRM is a valid way to do this but it opens a security hole in the process. SSH/WinRM with out very tight control can open a gate into your servers what would allow someone to do anything on it.\r\n\r\nWhen using the chef waiter it can only do one thing... Run chef.\r\n\r\nThe chef waiter was built with CI/CD in mind and all responses are mainly for integration with these pipelines. This makes integration easier than running chef via SSH and WinRM.\r\n\r\nA bonus point, chef waiter will run chef under its control and track it. Therefore if you have unstable connections you don't need to worry about it killing your chef runs.\r\n\r\n## How do I use Chef Waiter\r\n\r\nThe following URLs are available to you.\r\nThe are designed to be used by API clients rather than Web browsers. They return JSON strings mostly or simple text.\r\n\r\nThe default port for running Chef Waiter on is 8901 TCP.\r\n\r\nExample request:\r\n\r\n```bash\r\n$\u003e curl http://127.0.0.1:8901/chefclient\r\n```\r\n\r\n```json\r\n{\r\n    \"35434398-b40a-4686-ab38-38deccd4241b\": {\r\n        \"status\":\"registered\",\r\n        \"exitcode\":99,\r\n        \"starttime\":1542124123,\r\n        \"ondemand\":true\r\n    }\r\n}\r\n```\r\n\r\n```bash\r\ncurl -v -XPOST http://localhost:8901/chefclient --data-raw \"recipe[chefwaiter::test]\"\r\n```\r\n\r\n```json\r\n{\r\n    \"0a92d0a7-dfda-4b28-8195-0e00ff120fc5\":{\r\n        \"status\":\"running\",\r\n        \"exitcode\":99,\r\n        \"starttime\":1542124815,\r\n        \"ondemand\":true,\r\n        \"custom_run\":true,\r\n        \"custom_run_string\":\"recipe[chefwaiter::test]\"\r\n    }\r\n}\r\n```\r\n\r\n```bash\r\n$\u003e curl http://127.0.0.1:8901/chefclient/35434398-b40a-4686-ab38-38deccd4241b\r\n```\r\n\r\n```json\r\n{\r\n    \"35434398-b40a-4686-ab38-38deccd4241b\": {\r\n        \"status\":\"complete\",\r\n        \"exitcode\":0,\r\n        \"starttime\":1542124123,\r\n        \"ondemand\":true\r\n    }\r\n}\r\n```\r\n\r\n```bash\r\n$\u003e curl http://127.0.0.1:8901/chef/lastrun\r\n```\r\n\r\n```json\r\n{\r\n    \"last_run_guid\":\"35434398-b40a-4686-ab38-38deccd4241b\"\r\n}\r\n```\r\n\r\nChefwaiter will determine if the chef run passed or failed based on the exit code of the run. If the run passed you will see a status of `complete` if it failed you will see `failed`.\r\n\r\nBelow is a table describing the API for chef waiter. Chefwaiter was built with easy understanding for humans in mind. MOST the requests are GET based. There is very little that chefwaiter needs in terms of data and these are passed in via the URL.\r\n\r\n| URL | METHOD |Description|\r\n|-----|--------|------------|\r\n| /chefclient | GET | Use this to create a run. You will have a json payload returned with a guid for the run.\r\n| /chefclient | POST | Use this to create a run with a custom recipe string. See chef -o option. The string should be like `\"recipe[chefwaiter::test]\"`. It is also possible to override the lock with a query parameter in the URL `force=true`.\r\n| /chefclient/{guid} | GET | Used with the GUID that you received from /chefclient to get the status of the run.\r\n| /cheflogs/{guid} | GET | Used with the GUID that you received from /chefclient to get the chef logs from a run.\r\n| /chef/nextrun | GET | Used to get the time when the next run will happen. This time is the time when the server is free to start the next run and will usually happen with in a minute of this time.\r\n|/chef/interval| GET | Used to get the time between automatic chef runs.\r\n|/chef/interval/{i}| GET | Used to set the time between chef runs. This needs to be a positive number and represents minutes between runs.\r\n|/chef/on| GET | Used to turn on automatic runs of chef\r\n|/chef/off| GET | Used to turn off automatic runs of chef\r\n|/chef/lastrun| GET | Returns the guid of the last run. It starts as blank when the service starts.\r\n|/chef/allruns| GET | Used to get the state of all jobs in chefwaiter currently.\r\n|/chef/enabled| GET | Used to check if chef is currently enabled to run periodically\r\n|/chef/maintenance| GET | Shows if the chef waiter is in maintenance mode currently.\r\n|/chef/maintenance/start/{i}| GET | Requests that chef waiter be put into maintenance mode for i number of minutes. This must be a whole number.\r\n|/chef/maintenance/end| GET | Removes the maintenance timer allowing periodic runs to start again.\r\n|/chef/lock| GET | Shows the status of the lock for runs.\r\n|/chef/lock/set| GET | Turns on the lock for chef runs. Stops any runs from occurring.\r\n|/chef/lock/remove| GET | Turns off the lock for chef runs. Enables normal operation again.\r\n|/_status | GET | Return status information about the chef waiter.\r\n| /healthcheck | GET | Returns a 200 OK to show that the server is online.\r\n\r\n## Custom Runs\r\n\r\nChef waiter is able to do custom runs which allow you run recipes once without change the default run list.\r\nThis is useful when you want to run a subset of recipes or to bootstrap a machine then run a maintenance recipe the rest of the time.\r\n\r\nIt is important to consider the security implications of this. This effectively allows the chef waiter to run ANY recipe on your chef server once for each request.\r\n\r\nWith this in mind the configuration has a toggle that allows you to whitelist the text that you are allowed to post the chef waiter when requesting a custom run.\r\n\r\nThe text that you send needs to match exactly what you put in your whitelists. The whitelist is a list so many options can be made available.\r\n\r\nSee the [Configuration File](#configuration-file) for more details.\r\n\r\n## Installing\r\n\r\n### Preferred option\r\n\r\nThe chef waiter can be installed via the [chef-waiter cookbook](https://github.com/morfien101/chef-waiter-cookbook).\r\n\r\n### Optional method\r\n\r\n1. Download chef-waiter from the releases page.\r\n1. Extract the binary\r\n1. Move the binary to somewhere to run it.\r\n1. From a terminal or prompt windows run the below:\r\n\r\n```bash\r\n# Linux\r\n/usr/local/bin/chefwaiter --service install\r\n```\r\n\r\n```cmd\r\n# Windows\r\nC:\\Program Files\\chefwaiter\\chefwaiter.exe --service install\r\n```\r\n\r\nRemember to allow **8901 TCP** Inbound if you choose to install manually.\r\n\r\n## Running\r\n\r\nThe service is runs the same on Windows and Linux. The service binary itself is responsible for creating the service files needed to start and run the chef waiter as a service on which ever OS.\r\n\r\nMake sure that the service is running after installing it as discussed in the _Installing_ section.\r\nThe service will need port **8901-TCP** open to communicate with the outside world.\r\n\r\n### Firewall access\r\n\r\n| Port | Protocol | Description |\r\n|----|--------|-----------|\r\n| 8901 | TCP | Used to host the HTTP service for Chef Waiter\r\n\r\n### Directories of interest\r\n\r\n|Directory|OS|Description|\r\n|---------|--|-----------|\r\n|/etc/chefwaiter/ | Linux | Used to store configuration and state files for Chef Waiter|\r\n|/usr/local/bin/ | Linux | Location the binary is stored on a linux computer|\r\n|/var/log/chefwaiter/ |Linux| Location where Chef Waiter will store the log files for chef|\r\n|C:\\Program Files\\chefwaiter\\ | Windows | Location of both configuration files and binary|\r\n|C:\\logs\\chefwaiter\\ |Windows| Location where Chef Waiter will store the log files for chef|\r\n\r\n### Configuration file\r\n\r\nThe Chef Waiter can be configured by a configuration file in the form of json.\r\n\r\nThe file location needs to be set using an environment variable.\r\n\r\n`CHEFWAITER_CONFIG`\r\n\r\nIt should have the value of the file path eg:\r\n\r\n`/etc/chefwaiter/config.json`\r\n\r\nor\r\n\r\n`c:\\Program Files\\chefwaiter\\config.json`\r\n\r\nIf no config file is specified Chef Waiter will start with sane defaults.\r\n\r\nAn example file is below:\r\n\r\n```json\r\n{\r\n    \"state_table_size\": 20,\r\n    \"periodic_chef_runs\": true,\r\n    \"run_interval\": 10,\r\n    \"debug\": false,\r\n    \"logs_location\": /var/log/chefwaiter,\r\n    \"state_location\": /etc/chefwaiter,\r\n    \"metrics_enabled\": true,\r\n    \"metrics_host\": \"statsd-client.local:8125\",\r\n    \"metrics_default_tags\": {\r\n        \"tag_name\": \"value\",\r\n        \"tag_name\": \"value\"\r\n    },\r\n    \"whitelist_custom_runs\": true,\r\n    \"allowed_custom_runs\": [\r\n        \"role[chefwaiter]\",\r\n        \"recipe[deploy_new_app]\"\r\n    ]\r\n}\r\n```\r\n\r\nDefault Configuration settings:\r\n\r\n| Setting | Windows | Linux | Description |\r\n---|---|---|---\r\n|state_table_size| 20 | 20 | Chefwaiter will keep a log of the past x number of run. This setting dictates that value. |\r\n| periodic_chef_runs | true | true | This setting will tell chef waiter to run chef runs periodically like the normal chef service. |\r\n| run_interval | 30 | 30 | How often in minutes should chef waiter start a chef run. |\r\n| debug | false | false | Show debug log printing. |\r\n| logs_location | C:\\logs\\chefwaiter | /var/log/chefwaiter | Where should chefwaiter store the chef run logs. |\r\n| state_location | C:\\Program Files\\chefwaiter | /etc/chefwaiter | Chefwaiter writes a state file to disk periodically to maintain state through reboots. This settings dictates where that file should be kept. |\r\n| enable_tls | false | false | Should Chefwaiter us TLS on the web server. |\r\n| certificate_path | ./cert.crt | ./cert.crt | location of the TLS certificate. |\r\n| key_path | ./cert.key | ./cert.key | Location of the TLS certificates private key. |\r\nmetrics_enabled | false | false | Turn on the statsd metric shipper.\r\nmetrics_host | 127.0.0.1:8125 | 127.0.0.1:8125 | Location of the statsd server.\r\nmetrics_default_tags | nil | nil | Custom tags that you would like to add in key value pairs.\r\n| whitelist_custom_runs | false | false | Turn on the whitelist for custom runs.\r\n| allowed_custom_runs | nil | nil | A list of the text that chef waiter will accept for white listing the custom runs.\r\n\r\n## Maintenance mode\r\n\r\nThe Chef Waiter can be put into maintenance mode.\r\n\r\nThis dictates that **no periodic runs will be allowed to be triggered during this time period**.\r\n\r\nTherefore any periodic runs will be skipped and you would have to wait for the next time trigger to be started.\r\n\r\nMaintenance mode has no effect to **on demand** runs.\r\n\r\nThis will allow you to control the runs but also to stop uncontrolled runs from occurring while you are doing deployments.\r\n\r\n## Locking the chef waiter\r\n\r\nChef waiter has a lock out mode in it. This allows you to request that a server not run chef `on demand` or `periodically`.\r\n\r\nThis is useful for servers that are in production that you wish to protect from accidental changes.\r\n\r\nUse `/chef/lock` for checking the status of the lock.\r\n\r\n`/chef/lock/set` and `/chef/lock/remove` will enable and disable the lock respectively.\r\n\r\nThe lock can be overridden when running a custom job. This is because the job is already very specific, use with care.\r\n\r\nIt requires that you send a `force=true` query parameter in the URL when sending requests.\r\n\r\nSee example below:\r\n\r\n```bash\r\ncurl \"http://localhost:8901/chefclient?force=true\" --data '\"recipe[chefwaiter::test]\"'\r\n```\r\n\r\n## Chef service replacement\r\n\r\nThe Chef Waiter has been written to be a replacement for the chef __service__.\r\n\r\nThis feature is turned on by default and can be turn off with the use of the \"periodic_chef_runs\" configuration file setting. By making use of this feature you will be able to get the logs for the periodic runs via the API.\r\n\r\nImportant:\r\n\r\n```text\r\nPeriodic runs will run before on demand runs should there be 2 that are ready to be kicked off at the same time.\r\n\r\nThis in turn means that your on demand runs will always return the latest details.\r\n```\r\n\r\nThe periodic runs can also be controlled via the API. You can change the interval in minutes for the runs as well as turn it off and on. You can use \"/chef/lastrun\" to get the GUID for the last run which will allow you to get the logs for the run.\r\n\r\nThe logs for the periodic runs are stored under the same directory as on demand runs. They are also subject to the same clean up process. This means that you do not need to rotate logs as the chef waiter will do that for you.\r\n\r\n## Example Flow\r\n\r\n1. /chefclient (gather the GUID from this step)\r\n1. /chefclient/\u003cguid from step 1\u003e\r\n1. /cheflogs/\u003cguid from step 1\u003e\r\n\r\nIf you request a run while a run is queued you will keep getting the same guid back until the run starts and a new run can be queued. This means that you can only ever have 1 chef run running and 1 queued at a time.\r\n\r\n## Logging\r\n\r\nThe service will log to the default logging system for the OS that it is running on. Either Windows Event Viewer or Syslog for linux.\r\n\r\nLogs for chef runs will be contained in files that have the name set to the GUID that represents the chef run.\r\n\r\nThe files will be cleared out by the chef waiter periodically. This is triggered every minute and is controlled by a flag to specify the number of log files that you want to keep. The default is 20.\r\nThis can be changed as well as the location of the logs by settings in the above configuration file.\r\n\r\nLog file paths will look like below:\r\n\r\n```text\r\n# Linux\r\n/var/log/chefwaiter/0038cf85-68a1-4b8a-8898-f56261f02d65.log\r\n\r\n# Windows\r\n* C:\\logs\\chefwaiter\\0038cf85-68a1-4b8a-8898-f56261f02d65.log\r\n```\r\n\r\n## Metrics\r\n\r\nChef waiter sends out statsd metrics to an endpoint dictated by the `metrics_host` configuration value. Metrics need to be enabled by setting the `metrics_enabled` to `true` in the configuration file. If the values is not set no metrics will be sent.\r\n\r\nAll metrics will have a tag `host` which will be the host name or `not_available` if it can't be found for some reason.\r\nThe hostname can be overridden in the configuration by setting a tag called `host`.\r\n\r\nChef waiter will try to lookup the DNS record of the endpoint once ever 2 minutes. This allows for DNS name changes to happen with out the need to restart the chef waiter. Useful in modern distributed compute environments.\r\n\r\nThe following metrics are available.\r\n\r\nMetric Name | Metric Tags | Description\r\n---|---|---\r\nchefwaiter_starting | version: [chefwaiter_version] | Event sent when starting the chef waiter.\r\nchefwaiter_shutting_down | version: [chefwaiter_version] | Event sent when stopping the chef waiter.\r\nchefwaiter_state_table_size | none | How large the state table is. This should be the same as the number of logs being held by the chef waiter.\r\nchefwaiter_chef_run_time | none | How long the chef run took in Milliseconds\r\nchefwaiter_run_starting | job_type: [\"periodic\", \"demand\"] | A chef run has started.\r\nchefwaiter_run_finished | job_type: [\"periodic\", \"demand\"] | A chef run has finished.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorfien101%2Fchef-waiter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorfien101%2Fchef-waiter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorfien101%2Fchef-waiter/lists"}