{"id":31667797,"url":"https://github.com/onggizam/jsondumper","last_synced_at":"2026-05-18T09:10:09.868Z","repository":{"id":284465788,"uuid":"954500703","full_name":"onggizam/jsondumper","owner":"onggizam","description":"A Go-based tool that dynamically generates and runs PromQL queries from a YAML config and saves the results as JSON.","archived":false,"fork":false,"pushed_at":"2025-03-26T02:24:25.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T00:29:05.462Z","etag":null,"topics":["json","json-dumper","prometheus","prometheus-metrics"],"latest_commit_sha":null,"homepage":"","language":"Go","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/onggizam.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-25T07:17:13.000Z","updated_at":"2025-03-26T02:24:28.000Z","dependencies_parsed_at":"2025-03-26T03:36:47.521Z","dependency_job_id":null,"html_url":"https://github.com/onggizam/jsondumper","commit_stats":null,"previous_names":["seunggihong/jsondumper","onggizam/jsondumper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/onggizam/jsondumper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onggizam%2Fjsondumper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onggizam%2Fjsondumper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onggizam%2Fjsondumper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onggizam%2Fjsondumper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onggizam","download_url":"https://codeload.github.com/onggizam/jsondumper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onggizam%2Fjsondumper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["json","json-dumper","prometheus","prometheus-metrics"],"created_at":"2025-10-08T00:18:37.046Z","updated_at":"2026-05-01T09:32:49.365Z","avatar_url":"https://github.com/onggizam.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JsonDumper\n\nThis project is a Go application that automates Prometheus monitoring queries. It reads a flexible YAML configuration file that defines query templates and monitoring targets (such as pods or nodes), dynamically builds valid PromQL expressions, sends them to a Prometheus server, and saves the responses in structured JSON files. It is designed for extensibility and can support any Prometheus-compatible metrics or targets.\n\n---\n\n## Features\n\n- Dynamic query generation using YAML-based configuration\n- Target support: pod, namespace, node, and regex patterns\n- PromQL match operator support: `=`, `=~`, `!=`, `!~`\n- Prometheus HTTP API integration\n- JSON output for all responses\n- Easy-to-extend query templates\n\n---\n\n## YAML Configuration\n\n### Example: `config.yaml`\n\n```yaml\nprometheus:\n  server_ip: 'YOUR_PROMETHEUS_SERVER_IP'\n  port: 'YOUR_PROMETHEUS_SERVER_PORT'\n  output_dir: './output'\n  query_templates:\n    - name: \"EXAMPLE_NAME\"\n      expression: \"YOUR_QUERY\"\n      labels:\n        - key: \"pod\"\n          value_from: \"pod_name\"\n          match: \"=~\"\n        - key: \"namespace\"\n          value_from: \"namespace\"\n          match: \"=\"\n      filename_suffix: \"FILE_NAME\"\n  target:\n    - type: \"pod\"\n      pod_name: \"TARGET_POD_NAME\"\n      namespace: \"TARGET_NAMESPACE\"\n```\n### Field Descriptions\n\n📌***prometheus***\n\n| Field | Type | Description |\n|:--|:--|:--|\n|server_ip |string |IP address of the Prometheus server|\n|port |string |Port where Prometheus is running |\n|output_dir |string |Directory path to save JSON output files|\n|query_templates |list |A list of query template objects|\n|target |list |A list of monitoring target|\n\n📌***query_templates***\n\n|Field |Type |Description|\n|:--|:--:|:--|\n|name |string| Logical name of the query|\n|expression |string |PromQL template with %s for label selectors|\n|labels |list |List of label definitions used in the selector|\n|filename_suffix |string |Used to name output JSON files|\n\n📌***labels (inside each query template)***\n\n|Field| Type| Description|\n|:--|:--|:--|\n|key| string| Prometheus label key (e.g., pod, namespace)|\n|value_from |string |Field name in target config to substitute (e.g., pod_name, namespace)|\n|match |string| PromQL match operator: =, =~, !=, !~|\n\ntarget\n\n|Field| Type| Description|\n|:--|:--|:--|\n|type | string| Target type, e.g., pod or node|\n|pod_name|string|Pod name or regex pattern (required if type is pod)|\n|namespace|string|Kubernetes namespace (required for pod targets)|\n|node_name|string|Node name (used if type is node)|\n\n## Usage\n### Build and Run\n```bash\ngo build -o promquery\n./promquery --path=config.yaml\n```\nOr run without building:\n```bash\ngo run main.go --path=config.yaml\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonggizam%2Fjsondumper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonggizam%2Fjsondumper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonggizam%2Fjsondumper/lists"}