Skip to content

Instantly share code, notes, and snippets.

@bat9r
Last active May 7, 2019 09:14
Show Gist options
  • Save bat9r/bc5bd252680f295f04727e257300aa25 to your computer and use it in GitHub Desktop.
Save bat9r/bc5bd252680f295f04727e257300aa25 to your computer and use it in GitHub Desktop.

With fluent-logger-python

Link to library https://github.com/fluent/fluent-logger-python

Example

Fluentd service name: "fluentd-svc.elk.svc.cluster.local"
Install library:pip install fluent-logger Python code:

>>> from fluent import sender
>>> logger = sender.FluentSender('app', host='fluentd-svc.maintenance.svc.cluster.local', port=24224)
>>> logger.emit('test', {'from': 'localhost', 'to': 'fluentd'})
True

You should use tag: "app", full name for fluentd host "fluentd-svc.maintenance.svc.cluster.local" and port "24224".

Kibana:
To access, send the address of your github account (skype mikepylypyshyn). After it, receive invite from kibana-fe github organization. Go to site https://imagery-kibana-dev.granduke.net and authorized with your github accaunt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment