Icinga / Icinga/icinga2

Define custom date stamp in ElasticsearchWriter module

Open
#9,837 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/elastic enhancement
Dominant language
C++
Stars
2.2k
Forks
616
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Hi,

thank you for fixing the problem with Elastic v8 and the ElasticsearchWriter module on this way.

Now i have a feature request for the file
https://github.com/Icinga/icinga2/blob/master/lib/perfdata/elasticsearchwriter.cpp -> line 466

Could you please add a option in /etc/icinga2/features-available/elasticsearch.conf to make it possible to define a custom date stamp ?

For example "$index_%Y%m%d"

Btw.
Your documentation no longer matches this file. :)
https://icinga.com/docs/icinga-2/latest/doc/09-object-types/#objecttype-elasticsearchwriter

Documentation:
$index-$d.$M.$y

File:
"-%Y.%m.%d"

Thank you

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/perfdata/elasticsearchwriter.cpp around line 466 and the ElasticsearchWriter settings in /etc/icinga2/features-available/elasticsearch.conf. Compare the current date-stamp behavior with the requested "$index_%Y%m%d" format and the documented example, then update the implementation, configuration option, and documentation so custom stamps are supported and the examples match.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, elasticsearch
Domain
databases, observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.