{"id":20031417,"url":"https://github.com/ageagainstthemachine/windows-telegraf-auto-refresh","last_synced_at":"2026-03-19T13:09:05.485Z","repository":{"id":188164864,"uuid":"677757938","full_name":"ageagainstthemachine/Windows-Telegraf-Auto-Refresh","owner":"ageagainstthemachine","description":"Routine automatic InfluxDB 2 configuration refreshes with the Telegraf service on Windows","archived":false,"fork":false,"pushed_at":"2023-08-14T03:32:33.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T05:25:55.477Z","etag":null,"topics":["batch-script","task-scheduler","telegraf","windows-services"],"latest_commit_sha":null,"homepage":"","language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ageagainstthemachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-12T14:41:38.000Z","updated_at":"2023-08-14T03:28:27.000Z","dependencies_parsed_at":"2023-08-14T04:38:22.200Z","dependency_job_id":null,"html_url":"https://github.com/ageagainstthemachine/Windows-Telegraf-Auto-Refresh","commit_stats":null,"previous_names":["ageagainstthemachine/windows-telegraf-auto-refresh"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ageagainstthemachine/Windows-Telegraf-Auto-Refresh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageagainstthemachine%2FWindows-Telegraf-Auto-Refresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageagainstthemachine%2FWindows-Telegraf-Auto-Refresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageagainstthemachine%2FWindows-Telegraf-Auto-Refresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageagainstthemachine%2FWindows-Telegraf-Auto-Refresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ageagainstthemachine","download_url":"https://codeload.github.com/ageagainstthemachine/Windows-Telegraf-Auto-Refresh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageagainstthemachine%2FWindows-Telegraf-Auto-Refresh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30107207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T01:39:18.192Z","status":"online","status_checked_at":"2026-03-05T02:00:06.710Z","response_time":93,"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":["batch-script","task-scheduler","telegraf","windows-services"],"created_at":"2024-11-13T09:32:52.607Z","updated_at":"2026-03-05T02:31:42.150Z","avatar_url":"https://github.com/ageagainstthemachine.png","language":"Batchfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Windows-Telegraf-Auto-Refresh\nRoutine automatic InfluxDB 2 configuration refreshes with the Telegraf service on Windows\n\n### Prerequisites\n- Windows client machine to be monitored\n- Latest Telegraf binary for Windows (available via \u003ca href=\"https://github.com/influxdata/telegraf\" target=\"_blank\"\u003eGitHub\u003c/a\u003e)\n- InfluxDB 2 server to send metrics back to (accessible by the Windows client machine)\n- InfluxDB 2 Telegraf configuration ready for deployment, including API endpoint URL and Token generated\n\n\n### Process Overview\nThe way I've developed this process over the past few years is to deploy the latest Telegraf binary with an installation batch/command file which goes through a number of operations to achieve a desired result.\n\nThe process in a nutshell is as follows:\n- The target installation directory is created on the system\n- The Telegraf binary is copied to the installation directory (along wth supporting restart command stub file and uninstallation command file)\n- The Telegraf Windows service is setup/installed via (parameter-based) binary interaction\n- The Telegraf Windows service is started\n- A scheduled task is created that restarts the Windows service every hour, effectively refreshing the configuration pull\n\n\n### Security\nOne thing to note is that in this configuration, the InfluxDB token is being stored in the Windows OS as an environment variable. This has obvious security implications due to the token being present in plain text and accessible globally on the system. Unfortunately, there isn't a great solution here if this is a concern on the systems you're deploying to. The only other option I am aware of is to embed the Token in the configuration file. In that regard, choose your own adventure and monitor accordingly from a security standpoint.\n\n\n### More Information\nFor more information, see \u003ca href=\"https://julianmcconnell.com/posts/Automatic_Telegraf_Config_Refreshes/\" target=\"_blank\"\u003ehere\u003c/a\u003e.\n\n\n### Development\nThere is a development branch available if you're feeling adventurous.\n\nIf you see something I have missed, something I should do differently, something I could do better, or maybe there is something you think could be added, please let me know.\n\n\n### Disclaimer\nThese scripts are probably unstable and full of bugs. Like everything else on the internet, run at your own risk.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fageagainstthemachine%2Fwindows-telegraf-auto-refresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fageagainstthemachine%2Fwindows-telegraf-auto-refresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fageagainstthemachine%2Fwindows-telegraf-auto-refresh/lists"}