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

Add closing quotationmarks in Validator for influxdb writer config #10174

Conversation

SebastianOpeni
Copy link
Contributor

When having a macro error in the influxdb writer config the error message is missing a closing single-quotation mark.

Before:

Error: Validation failed for object 'influxdb2' of type 'Influxdb2Writer'; Attribute 'host_template' -> 'tags' -> 'foo': Closing $ not found in macro format string 'bar$
Location: in /usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf: 14:3-20:3
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(12):   //flush_threshold = 1024
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(13):   //flush_interval = 10s
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(14):   host_template = {
                                                                      ^^^^^^^^^^^^^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(15):     measurement = "$host.check_command$"
                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(16):     tags = {
                                                                    ^^^^^^^^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(17):       hostname = "$host.name$"
                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(18):       foo = "bar$"
                                                                    ^^^^^^^^^^^^^^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(19):     }
                                                                    ^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(20):   }

After:

Error: Validation failed for object 'influxdb2' of type 'Influxdb2Writer'; Attribute 'host_template' -> 'tags' -> 'foo': Closing $ not found in macro format string 'bar$'.
Location: in /usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf: 14:3-20:3
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(12):   //flush_threshold = 1024
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(13):   //flush_interval = 10s
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(14):   host_template = {
                                                                      ^^^^^^^^^^^^^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(15):     measurement = "$host.check_command$"
                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(16):     tags = {
                                                                    ^^^^^^^^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(17):       hostname = "$host.name$"
                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(18):       foo = "bar$"
                                                                    ^^^^^^^^^^^^^^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(19):     }
                                                                    ^^^^^
/usr/local/icinga2/etc/icinga2/features-enabled/influxdb2.conf(20):   }

This is a small fix discussed here:
#10074 (comment)

@cla-bot cla-bot bot added the cla/signed label Sep 25, 2024
Al2Klimov
Al2Klimov previously approved these changes Sep 25, 2024
@Al2Klimov Al2Klimov added bug Something isn't working area/influxdb Metrics to InfluxDB labels Sep 25, 2024
@Al2Klimov Al2Klimov added this to the 2.15.0 milestone Sep 25, 2024
@SebastianOpeni
Copy link
Contributor Author

SebastianOpeni commented Sep 25, 2024

I set my mail address as not private now.

@SebastianOpeni
Copy link
Contributor Author

I don't know why the AUTHORS check fails here but accepts the other pull request...

@yhabteab
Copy link
Member

yhabteab commented Sep 26, 2024

Hi, can you please drop the merge commit (fcf2f5c) from this PR as it contains a random email of yours automatically generated by GitHub. This is the reason why GA is also failing.
+Sebastian Grund <[email protected]>

@SebastianOpeni SebastianOpeni force-pushed the fix/influxdbwriter-validator-add-closing-quotation-marks branch from fcf2f5c to 90c76ad Compare September 26, 2024 08:04
@SebastianOpeni
Copy link
Contributor Author

I see, because I accepted the PullRequest from @Al2Klimov in the Github-UI with my mail still hidden.
Sorry for the unnecessary delay.

@yhabteab yhabteab merged commit 0fff415 into Icinga:master Sep 26, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/influxdb Metrics to InfluxDB bug Something isn't working cla/signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants