Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTSDB writer is escaping wrong chars for host names. #5963

Closed
ghost opened this issue Jan 10, 2018 · 0 comments · Fixed by #5964
Closed

OpenTSDB writer is escaping wrong chars for host names. #5963

ghost opened this issue Jan 10, 2018 · 0 comments · Fixed by #5964
Assignees
Labels
area/metrics General metrics handling area/opentsdb Metrics to OpenTSDB bug Something isn't working
Milestone

Comments

@ghost
Copy link

ghost commented Jan 10, 2018

Hostnames for metrics written to OpenTSDB using the opentsdbwriter have the dot (".") char replaced with an underscore ("_"), when it should only happen for metric names.

Expected Behavior

Hostnames in metrics should remain untouched, so that modules like graphana work with OpenTSDB.

Current Behavior

Hostnames have the dot char replaced: host.example.com will be written as host_example_com.

Possible Solution

Working on a PR with a fix.

Steps to Reproduce (for bugs)

  1. Setup opentsdb writer following the docs
  2. Look for the host tag in metrics called "icinga.*"

Your Environment

icinga2 - The Icinga 2 network monitoring daemon (version: r2.8.0)

Copyright (c) 2012-2017 Icinga Development Team (https://www.icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Application information:
  Installation root: /usr
  Sysconf directory: /etc
  Run directory: /run
  Local state directory: /var
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid

System information:
  Platform: CentOS Linux
  Platform version: 7 (Core)
  Kernel: Linux
  Kernel version: 3.10.0-693.11.6.el7.x86_64
  Architecture: x86_64

Build information:
  Compiler: GNU 4.8.5
  Build host: xxx

Disabled features: command compatlog debuglog elasticsearch gelf graphite influxdb livestatus perfdata statusdata syslog
Enabled features: api checker ido-mysql mainlog notification opentsdb

information/cli: Icinga application loader (version: r2.8.0)
information/cli: Loading configuration file(s).
information/ConfigItem: Committing config item(s).
information/ApiListener: My API identity: xxx
warning/ApplyRule: Apply rule 'backup-downtime' (in /etc/icinga2/conf.d/downtimes.conf: 5:1-5:52) for type 'ScheduledDowntime' does not match anywhere!
warning/ApplyRule: Apply rule 'check_device_stream_delay' (in /etc/icinga2/zones.d/master/services.conf: 591:1-591:41) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'check_ping' (in /etc/icinga2/zones.d/master/services.conf: 2454:1-2454:26) for type 'Service' does not match anywhere!
information/ConfigItem: Instantiated 1 ApiListener.
information/ConfigItem: Instantiated 240 Zones.
information/ConfigItem: Instantiated 240 Endpoints.
information/ConfigItem: Instantiated 2 ApiUsers.
information/ConfigItem: Instantiated 1 FileLogger.
information/ConfigItem: Instantiated 10 UserGroups.
information/ConfigItem: Instantiated 611 CheckCommands.
information/ConfigItem: Instantiated 1 IcingaApplication.
information/ConfigItem: Instantiated 238 Hosts.
information/ConfigItem: Instantiated 237 HostGroups.
information/ConfigItem: Instantiated 294 Dependencies.
information/ConfigItem: Instantiated 3 TimePeriods.
information/ConfigItem: Instantiated 11 Users.
information/ConfigItem: Instantiated 3 Comments.
information/ConfigItem: Instantiated 58 ServiceGroups.
information/ConfigItem: Instantiated 6176 Services.
information/ConfigItem: Instantiated 1 CheckerComponent.
information/ConfigItem: Instantiated 1 IdoMysqlConnection.
information/ConfigItem: Instantiated 1 NotificationComponent.
information/ConfigItem: Instantiated 1 OpenTsdbWriter.
information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
information/cli: Finished validating the configuration file(s).
@dnsmichi dnsmichi added the area/metrics General metrics handling label Jan 18, 2018
@dnsmichi dnsmichi added this to the 2.9.0 milestone Jan 20, 2018
@dnsmichi dnsmichi added the bug Something isn't working label Jan 20, 2018
@dnsmichi dnsmichi added the area/opentsdb Metrics to OpenTSDB label Jan 20, 2018
Crunsher pushed a commit that referenced this issue Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics General metrics handling area/opentsdb Metrics to OpenTSDB bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants