{"id":20585752,"url":"https://github.com/triglav-dataflow/triglav-agent-vertica","last_synced_at":"2025-08-22T23:05:56.646Z","repository":{"id":59158069,"uuid":"77114671","full_name":"triglav-dataflow/triglav-agent-vertica","owner":"triglav-dataflow","description":"Vertica agent for Triglav, data-driven workflow tool","archived":false,"fork":false,"pushed_at":"2017-04-13T16:54:06.000Z","size":61,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T09:21:14.753Z","etag":null,"topics":["ruby","triglav-agent","vertica"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/triglav-dataflow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-22T05:22:56.000Z","updated_at":"2017-03-14T15:09:55.000Z","dependencies_parsed_at":"2022-09-13T20:10:22.521Z","dependency_job_id":null,"html_url":"https://github.com/triglav-dataflow/triglav-agent-vertica","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triglav-dataflow%2Ftriglav-agent-vertica","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triglav-dataflow%2Ftriglav-agent-vertica/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triglav-dataflow%2Ftriglav-agent-vertica/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triglav-dataflow%2Ftriglav-agent-vertica/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/triglav-dataflow","download_url":"https://codeload.github.com/triglav-dataflow/triglav-agent-vertica/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248961237,"owners_count":21189993,"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","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":["ruby","triglav-agent","vertica"],"created_at":"2024-11-16T07:09:16.306Z","updated_at":"2025-04-14T21:10:19.758Z","avatar_url":"https://github.com/triglav-dataflow.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Triglav::Agent::Vertica\n\nTriglav Agent for Vertica\n\n## Requirements\n\n* Ruby \u003e= 2.3.0\n\n## Prerequisites\n\n* Vertica table must have a DATE column for `daily` resource monitor\n* Vertica table must have a TIMESTAMP or TIMESTAMPTZ column for `hourly` resource monitor\n* Vertica view is not supported (since `epoch` column can not be retrieved)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'triglav-agent-vertica'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install triglav-agent-vertica\n\n## CLI\n\n```\nUsage: triglav-agent-vertica [options]\n    -c, --config VALUE               Config file (default: config.yml)\n    -s, --status VALUE               Status stroage file (default: status.yml)\n    -t, --token VALUE                Triglav access token storage file (default: token.yml)\n        --dotenv                     Load environment variables from .env file (default: false)\n    -h, --help                       help\n        --log VALUE                  Log path (default: STDOUT)\n        --log-level VALUE            Log level (default: info)\n```\n\nRun as:\n\n```\nTRIGLAV_ENV=development bundle exec triglav-agent-vertica --dotenv -c config.yml\n```\n\n## Configuration\n\nPrepare config.yml as [example/config.yml](./example/config.yml).\n\nYou can use erb template. You may load environment variables from .env file with `--dotenv` option as an [example/example.env](./example/example.env) file shows.\n\n### serverengine section\n\nYou can specify any [serverengine](https://github.com/fluent/serverengine) options at this section\n\n### triglav section\n\nSpecify triglav api url, and a credential to authenticate.\n\nThe access token obtained is stored into a token storage file (--token option).\n\n### vertica section\n\nThis section is the special section for triglav-agent-vertica.\n\n* **monitor_interval**: The interval to watch tables (number, default: 60)\n* **connection_info**: key-value pairs of vertica connection info where keys are resource URI pattern in regular expression, and values are connection infomation\n\n### Specification of Resource URI\n\nResource URI must be a form of:\n\n```\nvertica://#{host}:#{port}/#{db}/#{schema}/#{table}\n```\n\nURI also accepts query parameters of `date`, `timestamp`, and `where`.\n\n* **date** (string): date column name (default: `d`)\n* **timestamp** (string): timestamp column name (defualt: `t`)\n* **where** (hash): where conditions (default: nil)\n * A value looks like an integer string is treated as an integer such as `1`\n * If you want to treat it as as string, surround with double quote or single quote such as `'0'`\n * A value does not look like an integer is treated as a string such as `foo`\n * Only equality operator is supported now\n\nex)\n\n```\n?date=d\u0026timestamp=t\u0026where[id]=0\u0026where[d]=2016-12-30\n```\n\n## How it behaves\n\n1. Authenticate with triglav\n  * Store the access token into the token storage file\n  * Read the token from the token storage file next time\n  * Refresh the access token if it is expired\n2. Repeat followings in `monitor_interval` seconds:\n3. Obtain resource (table) lists of the specified prefix (keys of connection_info) from triglav.\n4. Connect to vertica with an appropriate connection info for a resource uri, and find tables which are newer than last check.\n5. Store checking information into the status storage file for the next time check.\n\n## Development\n\n### Prepare\n\n```\n./prepare.sh\n```\n\nEdit `.env` or `config.yml` file directly.\n\n### Start\n\nStart up triglav api on localhost.\n\nRun triglav-anget-vertica as:\n\n```\nTRIGLAV_ENV=development bundle exec triglav-agent-vertica --dotenv --debug -c example/config.yml\n```\n\nThe debug mode with --debug option ignores the `last_epoch` value in status file.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/triglav-workflow/triglav-agent-vertica. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriglav-dataflow%2Ftriglav-agent-vertica","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftriglav-dataflow%2Ftriglav-agent-vertica","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriglav-dataflow%2Ftriglav-agent-vertica/lists"}