{"id":21898271,"url":"https://github.com/fasibio/funk_agent","last_synced_at":"2026-04-05T21:35:09.176Z","repository":{"id":40292796,"uuid":"197017759","full_name":"fasibio/funk_agent","owner":"fasibio","description":"Docker/K8s Agent for Funk-Server","archived":false,"fork":false,"pushed_at":"2023-05-11T20:39:00.000Z","size":10264,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T06:12:24.149Z","etag":null,"topics":["docker","dockerswarm","elasticsearch","funk","golang","kibana","logger"],"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/fasibio.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":"2019-07-15T14:44:43.000Z","updated_at":"2019-12-23T21:27:34.000Z","dependencies_parsed_at":"2024-11-28T14:36:08.684Z","dependency_job_id":null,"html_url":"https://github.com/fasibio/funk_agent","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasibio%2Ffunk_agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasibio%2Ffunk_agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasibio%2Ffunk_agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasibio%2Ffunk_agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fasibio","download_url":"https://codeload.github.com/fasibio/funk_agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244909158,"owners_count":20530183,"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":["docker","dockerswarm","elasticsearch","funk","golang","kibana","logger"],"created_at":"2024-11-28T14:25:21.758Z","updated_at":"2025-12-30T23:52:17.048Z","avatar_url":"https://github.com/fasibio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Funk-agent\n\nThis is the Containeragent for [funk-server](https://github.com/fasibio/funk-server). \n\nIf you don´t know what funk is please read [here](https://github.com/fasibio/funk-server) first. \n\n[![pipeline status](https://gitlab.com/fasibio/funk_agent/badges/master/pipeline.svg)](https://gitlab.com/fasibio/funk_agent/commits/master) [![coverage report](https://gitlab.com/fasibio/funk_agent/badges/master/coverage.svg)](https://sonar.server2.fasibio.de/dashboard?id=fasibio_funk_agent_master)\n\n\n\nYou need one on each Host|Worker|Minion\n\nYou can configure each Agent different on each installation and combine the information to one Elasticsearch Stack.\n\n## Possible Environments to configure the Agent\n Envoirmentname | value | description | require\n ---            | ---   | ---         | ---  \nFUNK_SERVER | wss://[url]:[port] | Complete Funk Server URL | true\nCONNECTION_KEY | string | The Key to authenticate against [funk-server](https://github.com/fasibio/funk-server). Is declared at your funk-server | true\nINSECURE_SKIP_VERIFY | false (default) or true | disable ssl verification for server connection | false\nLOG_STATS | all cumulated(default) or no | this agent should be collect statsinformation (cumulated send the mostly needed Statsinfos like : RamUsageMb, CPUUsagePercent...) | false\nSWARM_MODE | false (default) or true | Agent run on a swarm Cluster. Get better Metainformation about the Containers. | false\nLOG_LEVEL | debug or info (default) or warn or error |Which log-level for the agent own logs | false\nENABLE_GEO_IP_INJECT  | false (default) or true | Will download a [geolite2](https://www.maxmind.com) DB to get geoinfomation by IP Adresses | false\nSTATSINTERVALL | 15 | If LOG_STATS is not no. than the intervall to collect this information\n\n## Possible Labels you can give each to tracking dockercontainer (by labels/annotation)\n\nlabelname | value | description\n---  | --- | --- \nfunk.log | boolean  (default true)  | big lever. log this container or not ?\nfunk.log.stats | boolean (default true)  | Log Stats info for this Container ?\nfunk.log.logs | boolean (default true) | Log Stdout/Stderr for this Container ? \nfunk.log.staticcontent | json string | static information who whants to send for this container for example: {\\\"stage\\\": \\\"dev\\\"} (take a look for escaping inside docker-compose.yml or manifest.yml)\nfunk.searchindex | string | the eleaticsearch index to log. It will generate a index for log and for stats info.  if empty it will use default_(logs|stats)\nfunk.log.geodatafromip |string (starts with .)| is the path inside your log to the ipaddress where geodata will be inject. something like this ```.RequestAddr``` (at the moment only work with flat data on root level). You have to enable environment(**ENABLE_GEO_IP_INJECT**) at your funk_agent to use this flag.\nfunk.log.formatRegex | regex with subgroups | funk logs json out of the box. If your logs have a format other than json (the complete line will be logged to field message) and you want to separate it, you can give the format by regex and decelerate submatches. \n\n\n## example formatRegex \nFor example you Loglines looking like this: \n```\n  [negroni] 2019-08-12T13:38:52Z | 200 |      1.519074ms | localhost:3001 | POST /graphql\n```\n\nyou can give this container the label funk.log.formatRegex with value: \n\n```\n\\\\[[a-z]*\\\\] *(?P\u003ctime\u003e[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z) *\\\\| *(?P\u003cstatus\u003e[0-9]{3}) *\\\\| *[\\\\t]{0,} *(?P\u003crequest_time\u003e\\\\d{0,5}.\\\\d+)(?P\u003crequest_format\u003e(ms|µs)) *\\\\| *(?P\u003cdomain\u003e.*) *\\\\| *(?P\u003cmethod\u003e(GET|POST|PUT|DELETE)) *(?P\u003cmessage\u003e.*)\n```\n\n**Attention** if you want to test it at an online regextool like [regexr](https://regexr.com/4j31a) you have to replace ```\\\\``` with ```\\```. \nThe Double Backslash you need at your docker-compose file\n\nIn Kibana you will see now an logentry with separate information: logs.time, logs.status, logs.request_ms, logs.domain ....\n\n\nI am sure your regex would be better than this example. \n\nIf you have build some Regex for standard logs like Apache, NGNIX, etc. I am happy to get Issue/Merge Request to add this to this Page. \n\n## Special at docker Swarm\nRun it as mode *global*\nAt the container you have to set Container labels not deploy labels. (the labels at root)\n\n\n## Dependencies\n\nIf you enable the flag enableGeoIPInject then this product includes GeoLite2 data created by MaxMind, available from\n[https://www.maxmind.com](https://www.maxmind.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffasibio%2Ffunk_agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffasibio%2Ffunk_agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffasibio%2Ffunk_agent/lists"}