Skip to main content

ES-Logger

The es-logger project intends to build a pluggable data processor that will take data from Jenkins builds and push that data into Elasticsearch via Logstash.

Installation and Running

Install the framework using:

python ./setup.py install

Install from source for developing using:

python ./setup.py develop

Install from pypi repository with:

pip install --extra-index-url \
    https://engci-maven-master.cisco.com/artifactory/api/pypi/uctg-galway-pypi/simple \
    es-logger

After that, set environment variables needed, and just execute es-logger!

Jenkins Connection

  • JENKINS_URL - Used to prefix the location to gather Jenkins data from using the python-jenkins library
  • JENKINS_USER - Username to access Jenkins
  • JENKINS_PASSWORD - Password to access Jenkins. Can also be an API key

Job Information

  • ES_JOB_NAME - The full job name with all paths, added to the JENKINS_URL
  • ES_BUILD_NUMBER - The build number to collect data for

Plugins

  • PROCESS_CONSOLE_LOGS - Console log processor plugins to run, space separated list
  • GATHER_BUILD_DATA - Build data gatherer plugins to run, space separated list
  • GENERATE_EVENTS - Event generator plugins to run, space separated list

Logstash Target

  • LOGSTASH_SERVER - HTTP server configured to receive json messages, as per the sample configuration
  • LS_USER - User to connect to Logstash with
  • LS_PASSWORD - Password to connect to Logstash with

Plugins

The plugin infrastructure is provided by the stevedore library.

There are following types of plugin supported:

Console Log Processors

These plugins will have a process function called that is passed the full console log of the job. It can perform any actions desirable, and shall return data, which will be added to the es_info['console_log_plugins'][plugin_name] structure that is pushed to logstash. A list or a dict is preferred as a return type.

Build Data Gatherers

These plugins will have a gather function that is passed the EsCollector object. This should provide any data needed for the plugin to gather any additional data that should be added to the es_info. This could include test results from an external system not available to Jenkins, parsed logs from an external piece of hardware, etc.

The return should be a dictionary, which will be added to the es_info['build_data'][plugin_name] structure that is pushed to logstash.

Event Generators

An event generator is intended to process the Jenkins information and generate a number of events based off that data. This allows for the creation of unique events per-host or per-test if the Jenkins job operates on multiple resources. The structures returned are expected to be very small, so surfacing data points to form the basis of visualisations. A small number of default fields will be added by the main program to identify the origination of the data, and the event data will become contained in a top-level key named after the plugin.

The return from the generator should be a list of events that will be posted to logstash

Metadata

Release files for es-logger 2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for es-logger 2.4
File Size Uploaded Provenance Actions
es_logger-2.4.tar.gz 14.7 kB Without provenance Details for es_logger-2.4.tar.gz

Release files / es_logger-2.4.tar.gz

Download URL es_logger-2.4.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7092de8cd461acbc1ab89ce12fced530dcd2482085c4d4fdaccc0d3394d024c0
BLAKE2b-256 checksum
How to use checksums
d2d08e025e6bf4a036a8c4136487761bf3e0a4b468ed257d85ed3225d638d8d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for es-logger 2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.4 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page