Getting started with Monium.Logs
Monium.Logs is a distributed and highly available system for storing, searching, visualizing, and analyzing logs. The system forms a part of Monium and makes use of its shared components, i.e., access management, data model, and unified interface.
Monium.Logs features:
-
Monium currently only accepts OpenTelemetry (OTLP)
data. -
You can write logs via the API in gRPC and HTTP formats.
-
Address for writing logs:
ingest.monium.yandex.cloud:443. -
To write logs, you will need a service account with the
monium.logs.writerrole and an API key. -
Log viewing interface: Monium home page
> Logs.
Setting up logging
Follow these steps to set up log transfer from your application to Monium.Logs through Unified Agent. The application will send logs in OTLP format to the local Unified Agent input, and the agent will collect the logs and deliver them to Monium. The application can be located either in your local infrastructure or in Yandex Cloud.
You also can set up log transfer through Fluent Bit or directly from the app. By using the agent, you separate the generation of logs and their delivery to the storage system. This approach removes the need for the application to write data to the storage system and prevents data loss in case of failures.
If you are not signed up to Yandex Cloud
-
Log in to the management console
or sign up. If not signed up yet, navigate to the management console and follow the instructions. -
On the Yandex Cloud Billing page
, make sure you have a linked billing account with theACTIVEorTRIAL_ACTIVEstatus. If you do not have a billing account yet, create one.If you have an active billing account, you can navigate to the cloud page
to create or select a folder for your infrastructure.
-
Create a service account with the
monium.logs.writerrole. -
Create an API key for the service account.
-
Set up log transfer from your application in OTLP format:
- Install an SDK
for relevant programming language. - Set up log transfer to the address the agent will be listening to, e.g,
localhost:8889.
- Install an SDK
-
Install Unified Agent.
-
Configure Unified Agent to listen to the app's logs and send them to Monium.
Example configuration:
storages: - name: logs_storage plugin: fs config: directory: /my/logs_storage max_partition_size: 1gb routes: - input: plugin: otel_logs config: port: 8889 channel: pipe: - storage_ref: name: logs_storage output: plugin: otel_logs config: project: folder__<folder_ID> cluster: doc format: proto url: "ingest.monium.yandex.cloud:443" tvm: client_id: 2025442 destination_id: 2045111 secret: file: /my/secret/tokenIn this configuration, Unified Agent will accept application logs in OpenTelemetry format at
localhost:8889and send them to the collector that writes logs from the2025442TVM application to thefolder__<folder_ID>project.Unified Agent uses the otel_logs input to accept logs and the otel_logs output to transfer them.
-
Run your app and start sending logs.
Viewing logs
- On the Monium home page
, select Logs on the left. - At the top, set the search interval using the timeline, a preset interval, or by entering the time value directly.
- In the search bar, enter a query to search for application logs:
- Select the
folder__<folder_ID>project. By default, the current folder's project is selected. - Enter your query to search for application logs.
- Click Execute query.
- Select the
- To view logs for a specific entry, expand it.