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

Do not convert/calculate on custom variable content #659

Closed
log1-c opened this issue Sep 4, 2023 · 3 comments · Fixed by #657
Closed

Do not convert/calculate on custom variable content #659

log1-c opened this issue Sep 4, 2023 · 3 comments · Fixed by #657
Labels
bug Something isn't working

Comments

@log1-c
Copy link

log1-c commented Sep 4, 2023

Describe the bug

We user the custom variable/field notification_delay on service checks to delay notifications for specific kinds of checks.
When entering big numbers like 2592000 they get converted when shown in the webinterface
image

Expected behavior

Show the content of the variable as is

Your Environment

Include as many relevant details about the environment you experienced the problem in.

  • Icinga DB Web version (System - About): 1.0.2
  • Icinga Web 2 version (System - About): 2.11.4
  • Web browser: Edge/Vivaldi
  • Icinga 2 version (icinga2 --version): 2.14.0
  • Icinga DB version (icingadb --version): 1.1.0
  • PHP version used (php --version):
  • Server operating system and version: rhel8

Additional context

Add any other context about the problem here.

@nilmerg
Copy link
Member

nilmerg commented Sep 6, 2023

Seems to be related to the PHP version. I cannot reproduce this on 8.x, only on 7.x.

@nilmerg nilmerg added the bug Something isn't working label Sep 6, 2023
@Al2Klimov
Copy link
Member

Given you're right, whatever PHP is doing here is scary:

MariaDB [icingadb]> select flatvalue from customvar_flat where flatname='dummy_statee'\G
*************************** 1. row ***************************
flatvalue: 2e+18
1 row in set (0.001 sec)

MariaDB [icingadb]>

@Al2Klimov
Copy link
Member

Yep, in Go fmt.Sprintf("%v", 2000000000000000000) == "2e+18". Our Flatten() uses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants