{"id":18446505,"url":"https://github.com/ovh/ldp-tail","last_synced_at":"2025-04-08T00:31:52.349Z","repository":{"id":22061392,"uuid":"95120092","full_name":"ovh/ldp-tail","owner":"ovh","description":"OVH Logs Data Platform - Tail CLI tooling ","archived":false,"fork":false,"pushed_at":"2025-03-09T16:38:53.000Z","size":48,"stargazers_count":25,"open_issues_count":4,"forks_count":9,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-23T03:11:24.159Z","etag":null,"topics":["cli","ldp","logging","ovh","tail"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ovh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2017-06-22T13:44:59.000Z","updated_at":"2025-03-09T16:37:32.000Z","dependencies_parsed_at":"2024-06-19T00:21:10.816Z","dependency_job_id":"678cded0-a5d8-4bd5-be2a-7b37be6325c6","html_url":"https://github.com/ovh/ldp-tail","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovh%2Fldp-tail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovh%2Fldp-tail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovh%2Fldp-tail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovh%2Fldp-tail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ovh","download_url":"https://codeload.github.com/ovh/ldp-tail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755388,"owners_count":20990616,"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":["cli","ldp","logging","ovh","tail"],"created_at":"2024-11-06T07:09:34.659Z","updated_at":"2025-04-08T00:31:52.011Z","avatar_url":"https://github.com/ovh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ovh/ldp-tail.svg?branch=master)](https://travis-ci.org/ovh/ldp-tail)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ovh/ldp-tail)](https://goreportcard.com/report/github.com/ovh/ldp-tail)\n\nLogs Data Platform - Tail\n=========================\n\nThis tool allows you to display the logs pushed in Logs Data Platform in real time.\nMore infos on Logs Data Platform and how to obtain the stream uri: https://docs.ovh.com/gb/en/logs-data-platform/ldp-tail/\n\n\nInstallation\n------------\nTo install cli, simply run:\n```\n$ go install github.com/ovh/ldp-tail@latest\n```\n\nUsage\n-----\n```sh\nldp-tail --address \u003cURI\u003e\n```\n\nDemo\n----\n```sh\nldp-tail --address wss://gra1.logs.ovh.com/tail/?tk=demo --pattern \"{{ .short_message }}\"\n```\n\nParameters\n----------\n* Server\n  * `address` URI of the websocket\n* Filtering\n  * `match` Display only messages matching the condition. Example: `_method=verifyPassword`. You may specify an operator like: `_method.begin=verify` or negate its meaning like: `_method.not.begin=verify`. Available operators are:\n    * `present` The field is present\n    * `begin` The field begins with the value\n    * `contain` The field contains the value\n    * `lt` The field is less than the value\n    * `le` The field is less than or equal to the value\n    * `eq` The field is equal to the value\n    * `ge` The field is greater than or equal to the value\n    * `gt` The field is greater than the value\n    * `regex` The field match the regular expression\n* Formatting\n  * `raw` Display raw JSON message instead of parsing it\n  * `format` Display messages using a pre-defined format. Valid values:\n    * `logrus` Display messages like [Logrus](https://github.com/sirupsen/logrus) for messages sent with [Graylog Hook for Logrus](https://github.com/gemnasium/logrus-graylog-hook/)\n    * `logrus-color` Display colored messages like [Logrus](https://github.com/sirupsen/logrus) for messages sent with [Graylog Hook for Logrus](https://github.com/gemnasium/logrus-graylog-hook/)\n  * `pattern` Template to apply on each message to display it. Default: `{{._appID}}\u003e {{.short_message}}`. Custom available functions are:\n    * `color` Set text color. Available colors are: `green` `white` `yellow` `red` `blue` `magenta` `cyan`\n    * `bColor` Set background color. Available colors are: `green` `white` `yellow` `red` `blue` `magenta` `cyan`\n    * `noColor` Disable text and background color\n    * `date` Transform a timestamp in a human readable date. Default format is `2006-01-02 15:04:05` but can be customized with the second optional argument\n    * `join` Concatenates strings passed in argument with the first argument used as separator\n    * `concat` Concatenates strings passed in argument\n    * `duration` Transform a value in a human readable duration. First argument must be a parsable number. The second argument is the multiplier coefficient to be applied based on nanoseconds. Ex: 1000000 if the value is in milliseconds.\n    * `int` Converts a string or a number to an int64\n    * `float` Converts a string to float64\n    * `string` Converts a value to a string\n    * `get` Return the value under the key passed in the second argument of the map passed first argument. Useful for accessing keys containing a period. Ex: `{{ get . \"foo.bar\" }}`\n    * `column` Formats input into multiple columns. Columns are delimited with the characters supplied in the first argument. Ex: `\"{{ column \" | \" (date .timestamp) (concat ._method \" \" ._path ) ._httpStatus_int }}`\n    * `begin` Return true if the first argument begins with the second\n    * `contain` Return true if the second argument is within the first\n    * `level` Transform a Gelf/Syslog level value (0-7) to a syslog severity keyword\n* Config\n  * `config` Config file loaded before parsing parameters, so parameters will override the values in the config file (except for `match` where parameters will add more criteria instead of replacing them). The config file use the [TOML](https://github.com/toml-lang/toml) file format. The structure of the configuration file is:\n```\nAddress string\nMatch   []{\n    Key      string\n    Operator string\n    Value    interface{}\n    Not      bool\n}\nPattern string\nRaw     bool\n```\nExemple:\n```\nAddress = \"wss://gra1.logs.ovh.com/tail/?tk=demo\"\nPattern = \"{{date .timestamp}}: {{if ne ._title \\\"\\\"}}[ {{._title}} ] {{end}}{{ .short_message }}\"\n```\n\n# Contributing\n\nYou've developed a new cool feature? Fixed an annoying bug? We'd be happy\nto hear from you! Make sure to read [CONTRIBUTING.md](./CONTRIBUTING.md) before.\n\n# License\n\nThis work is under the BSD license, see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovh%2Fldp-tail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovh%2Fldp-tail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovh%2Fldp-tail/lists"}