Coralogix provides seamless integration with FluentD so you can send your logs from anywhere and parse them according to your needs.
We recommend using the generic HTTP output plugin, as it has plenty of adjustability and exposed metrics.
To start sending logs to Coralogix, you will need to add us as an output on your configuration.
This is a generic example where all you need to supply is your cluster URL (please see table below) and account private key (Please note that the key should be inserted without quotation marks or apostrophes).
<label @CORALOGIX> <filter **> @type record_transformer @log_level warn enable_ruby true auto_typecast true renew_record true <record> # In this example we are using record.dig to dynamically set values. # Values can also be static or simple variables applicationName ${record.dig("kubernetes", "namespace_name")} subsystemName ${record.dig("kubernetes", "container_name")} computerName ${record.dig("kubernetes", "host")} timestamp ${time.strftime('%s%L')} # Optional text ${record.to_json} </record> </filter> <match **> @type http @id coralogix endpoint "<your cluster singles url>" headers {"private_key":<your cluster's private key>} retryable_response_codes 503 error_response_as_unrecoverable false <buffer> @type memory chunk_limit_size 5MB compress gzip flush_interval 1s overflow_action block retry_max_times 5 retry_type periodic retry_wait 2 </buffer> <secondary> #If any messages fail to send they will be send to STDOUT for debug. @type stdout </secondary> </match> </label>
Depending on your account’s geolocation you will need to provide the relevant URL to the configuration above:
Cluster Name | URL |
---|---|
EU | https://api.coralogix.com/logs/rest/singles |
US | https://api.coralogix.us/logs/rest/singles |
SG | https://api.coralogixsg.com/logs/rest/singles |
IN | https://api.app.coralogix.in/logs/rest/singles |
Private link | https://private-link-api.coralogix.us/logs/rest/singles |
If you have any questions or need additional guidance, our support team is available 24/7 via our in-app chat!