I have some services that are being checked every 2h. Any check_interval above 1h will cause this. This happens because the storage schema is set to 2h and the default view in graphite is 1h. Is it better to have a default storage schema of 1h for all services, even if you only check ever 2hrs?
Traceback (most recent call last):
File "/opt/graphite/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/opt/graphite/lib/python3.9/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/opt/graphite/lib/python3.9/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/graphite/webapp/graphite/errors.py", line 101, in new_f
return f(*args, **kwargs)
File "/opt/graphite/webapp/graphite/render/views.py", line 157, in renderView
response = renderViewGraph(graphOptions, requestOptions, data)
File "/opt/graphite/webapp/graphite/render/views.py", line 177, in renderViewGraph
image = doImageRender(requestOptions['graphClass'], graphOptions)
File "/opt/graphite/webapp/graphite/render/views.py", line 606, in doImageRender
img = graphClass(**graphOptions)
File "/opt/graphite/webapp/graphite/render/glyph.py", line 578, in __init__
self.drawGraph(**params)
File "/opt/graphite/webapp/graphite/render/glyph.py", line 1085, in drawGraph
self.consolidateDataPoints()
File "/opt/graphite/webapp/graphite/render/glyph.py", line 1427, in consolidateDataPoints
bestXStep = numberOfPixels / divisor
ZeroDivisionError: float division by zero
Expected Behavior
I am not sure what the answer is. If you request a 1hr period graph for a service that is checked every 2hrs then what should be done?
Possible Solution
Changing the default period for all of graphite to 1 day fixes the majority of issues, but doesn't solve it for data you check less than once per day.
Is there a way to change the default graphite view per service?
Context
apply Service "passive-disk6" {
import "generic-service"
name = "2h_passive-disk6"
check_interval = 2h
check_command = "dummy"
assign where host.vars.checkdisk == "test"
}
icinga2 - The Icinga 2 network monitoring daemon (version: v2.14.0)
Copyright (c) 2012-2023 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later https://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.
System information:
Platform: Debian GNU/Linux
Platform version: 11 (bullseye)
Kernel: Linux
Kernel version: 4.19.0-16-amd64
Architecture: x86_64
Build information:
Compiler: GNU 10.2.1
Build host: buildkitsandbox
OpenSSL version: OpenSSL 1.1.1n 15 Mar 2022
Application information:
General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2
Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var
Internal paths:
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
Icinga Web 2 Version | 2.11.4
director 1.10.2 Configure
icingadb 1.0.2 Configure
graphite 1.2.2 Configure
incubator 0.20.0 Configure
Graphite-Web 1.1.10 (python 3.9)
I have some services that are being checked every 2h. Any check_interval above 1h will cause this. This happens because the storage schema is set to 2h and the default view in graphite is 1h. Is it better to have a default storage schema of 1h for all services, even if you only check ever 2hrs?
Whisper files are populating as expected.
This is the error in icingaweb:
This is the URL that is requested by icingaweb from graphite via render.
This is the graphite error:
Expected Behavior
I am not sure what the answer is. If you request a 1hr period graph for a service that is checked every 2hrs then what should be done?
Possible Solution
Changing the default period for all of graphite to 1 day fixes the majority of issues, but doesn't solve it for data you check less than once per day.
Is there a way to change the default graphite view per service?
Context
graphite storage-schemas.conf (relevant section shown only)
Environment
icinga2 - The Icinga 2 network monitoring daemon (version: v2.14.0)
Copyright (c) 2012-2023 Icinga GmbH (https://icinga.com/) License GPLv2+: GNU GPL version 2 or later https://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.
System information: Platform: Debian GNU/Linux Platform version: 11 (bullseye) Kernel: Linux Kernel version: 4.19.0-16-amd64 Architecture: x86_64
Build information: Compiler: GNU 10.2.1 Build host: buildkitsandbox OpenSSL version: OpenSSL 1.1.1n 15 Mar 2022
Application information:
General paths: Config directory: /etc/icinga2 Data directory: /var/lib/icinga2 Log directory: /var/log/icinga2 Cache directory: /var/cache/icinga2 Spool directory: /var/spool/icinga2 Run directory: /run/icinga2
Old paths (deprecated): Installation root: /usr Sysconf directory: /etc Run directory (base): /run Local state directory: /var
Internal paths: 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
Icinga Web 2 Version | 2.11.4 director 1.10.2 Configure icingadb 1.0.2 Configure graphite 1.2.2 Configure incubator 0.20.0 Configure Graphite-Web 1.1.10 (python 3.9)