{"id":20699912,"url":"https://github.com/mrmarble/pvpc-telegraf-plugin","last_synced_at":"2025-10-05T01:09:11.846Z","repository":{"id":45243365,"uuid":"441781769","full_name":"MrMarble/pvpc-telegraf-plugin","owner":"MrMarble","description":"Telegraf input plugin to fetch PVPC prices","archived":false,"fork":false,"pushed_at":"2023-03-07T03:12:28.000Z","size":8223,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-11T03:44:53.105Z","etag":null,"topics":["electricity","influxdb","pvpc","spain","telegraf","telegraf-plugin"],"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/MrMarble.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,"governance":null}},"created_at":"2021-12-26T00:28:39.000Z","updated_at":"2022-07-04T22:32:50.000Z","dependencies_parsed_at":"2023-12-01T04:42:59.076Z","dependency_job_id":null,"html_url":"https://github.com/MrMarble/pvpc-telegraf-plugin","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":"0.24137931034482762","last_synced_commit":"23630d93f093adf11251113ad6492cf16ab61d3e"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/MrMarble/pvpc-telegraf-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMarble%2Fpvpc-telegraf-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMarble%2Fpvpc-telegraf-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMarble%2Fpvpc-telegraf-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMarble%2Fpvpc-telegraf-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrMarble","download_url":"https://codeload.github.com/MrMarble/pvpc-telegraf-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMarble%2Fpvpc-telegraf-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278396549,"owners_count":25979805,"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-04T02:00:05.491Z","response_time":63,"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":["electricity","influxdb","pvpc","spain","telegraf","telegraf-plugin"],"created_at":"2024-11-17T00:32:46.580Z","updated_at":"2025-10-05T01:09:11.806Z","avatar_url":"https://github.com/MrMarble.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PVPC Telegraf Plugin\n\n[![golangci-lint](https://github.com/MrMarble/pvpc-telegraf-plugin/actions/workflows/lint.yml/badge.svg)](https://github.com/MrMarble/pvpc-telegraf-plugin/actions/workflows/lint.yml)\n\nGather Spanish electricity hourly prices from https://www.ree.es/es/apidatos.\n\n## Build and Run\n\nTo build this plugin, just run (go environment needed, at least 1.17):\n\n```\nmake\n```\n\nWhich will build the binary ./bin/pvpc\n\nYou can run it with `./bin/pvpc --config plugin.conf`\n\n## Configuration\n\n```toml\n[[inputs.Pvpc]]\n\t## Defines the time aggregation of the requested data.\n\ttime_trunc = \"hour\"\n\n\t## Time range. \n\t## If omitted, today's price is obtained.\n\t## Defines the starting date in ISO 8601 format.\n\t#start_date=\"2021-12-26T00:00:00Z\"\n\t## Defines the ending date in ISO 8601 format.\n\t#end_date=\"2021-12-26T23:59:00Z\"\n\n\t## Id of the autonomous community/electrical system. Optional\n\tgeo_id = 8741\n\t\n\t## Http request timeout.\n\thttp_timeout=\"10s\"\n\n```\n\nOnce compiled and configured, you could add the plugin to Telegraf adding this configuration:\n\n```toml\n[[inputs.execd]]\n  ## One program to run as daemon.\n  ## NOTE: process and each argument should each be their own string\n  command = [\"/path/to/pvpc\", \"--config\", \"/path/to/plugin.conf\"]\n\n  ## Define how the process is signaled on each collection interval.\n  ## Valid values are:\n  ##   \"none\"    : Do not signal anything. (Recommended for service inputs)\n  ##               The process must output metrics by itself.\n  ##   \"STDIN\"   : Send a newline on STDIN. (Recommended for gather inputs)\n  ##   \"SIGHUP\"  : Send a HUP signal. Not available on Windows. (not recommended)\n  ##   \"SIGUSR1\" : Send a USR1 signal. Not available on Windows.\n  ##   \"SIGUSR2\" : Send a USR2 signal. Not available on Windows.\n  signal = \"none\"\n\n  ## Delay before the process is restarted after an unexpected termination\n  restart_delay = \"10s\"\n\n  ## Data format to consume.\n  ## Each data format has its own unique set of configuration options, read\n  ## more about them here:\n  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md\n  data_format = \"influx\"\n  \n  # Set interval to 24h\n  interval = \"24h\"\n```\n\n## Metrics\n\n- pvpc\n    - tags:\n        - geo_id (uin32)\n    - fields:\n        - value (float64)\n\n## Example Output\n\n```\npvpc,geo_id=8741 value=291.07 1575008500000000000\npvpc,geo_id=8741 value=196.58 1575008500000000000\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmarble%2Fpvpc-telegraf-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrmarble%2Fpvpc-telegraf-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmarble%2Fpvpc-telegraf-plugin/lists"}