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

Improve configuration snippets for Icinga #21

Merged
merged 1 commit into from
Mar 14, 2022

Conversation

amotl
Copy link
Contributor

@amotl amotl commented Mar 12, 2022

Dear Frederic,

in order to improve installation convenience further, this time on the »Icinga integration« side, the goal of this patch 1 is to provide complete Icinga configuration resources which can be reused out of the box. We verified it by running it on our servers already, which was needed to adjust some further bits. We hope you like it.

Features

  • The configuration provides reasonable default threshold values (warning/critical) for the corresponding sensor modes.
    Please let me know if you think some of the default values can be improved.
  • For addressing the Synology appliance, either host.vars.synology_host or $address$ is used.
  • With host.vars.synology_location, you can optionally provide a human-readable label to the monitored appliance.
    This will get reflected as suffix to the display_name.
  • Optionally enable command_endpoint = host_name for running the check program on a different host.
  • Beside host.vars.os == "DSM", the check will also trigger on host.vars.check_synology == true.
    This is useful if the Service object is assigned to another, non-DSM, host.
  • Provide reasonable inline documentation which describe the configuration parameters in more detail.

Screenshot

image

With kind regards,
Andreas.

/cc @Tonkenfo

Footnotes

  1. It is based upon my previous changes Provide code from repository as real Python package #20. For looking at the very diff right now instead of the PR which also includes the previous commits, 0b1eb88 would be the right choice.

Comment on lines 97 to 101
// Warn if system temperature is higher than °C.
// https://www.tomshardware.com/how-to/how-to-monitor-cpu-temp-temperature
vars.synology_mode = "status"
vars.synology_warning = host.vars.synology_temperature_warning || 65
vars.synology_critical = host.vars.synology_temperature_critical || 80
Copy link
Contributor Author

@amotl amotl Mar 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about those default thresholds. Do you know if this is a temperature sensor attached to the motherboard, or is it actually CPU core temperature?

To provide some empirical evidence to this question, from the perspective of measured values, we are sharing the values from two monitored appliances. One yields a measurement value of 40°C, while the other one has 55°C already.

image

I didn't exactly follow the advices from https://www.tomshardware.com/how-to/how-to-monitor-cpu-temp-temperature, which would have been 80/95°C for warning/critical. Maybe you have any opinions about this, @wernerfred or @Tonkenfo?

Copy link
Contributor Author

@amotl amotl Mar 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked another program, Synology status, written in Bash. It employs those default threshold values, which are applied to both system and disk temperatures.

warningTemperature="50"
criticalTemperature="60"

Those values resonate more with my gut feeling. Considering the screenshot above, I believe the system with 55°C might prove to have a failed fan already.

Copy link
Contributor Author

@amotl amotl Mar 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the most recent update, the WARNING/CRITICAL threshold values became 50/60°C, as outlined above. I believe using a "better safe than sorry" approach for choosing default values is the right way to go, i.e. raising warnings earlier than later in the default configuration. Individual adjustments can be made anytime, so there is nothing to worry about.

This reasoning now has also been reflected within the inline documentation.

/**
 * 
 * Finding the right thresholds that fit everyone is not possible. So, in general,
 * the default values are more on the "better safe than sorry" side of the spectrum and
 * should be reconfigured based on individual needs.
 *
 * This is specifically applicable to system and disk temperature metrics, as those are
 * highly dependent on ambient temperature levels and vary hugely between regions on earth
 * and/or temperature conditioning scenarios.
 * 
 **/

Let me know if you take a different stance on this.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if this is a temperature sensor attached to the motherboard, or is it actually CPU core temperature?

No information on that. If i had to guess i would say mainboard sensors.

I believe using a "better safe than sorry" approach for choosing default values is the right way to go

+1

Comment on lines 52 to 56
// Warn if disk drive temperature is higher than °C.
// https://www.hdsentinel.com/forum/viewtopic.php?f=32&t=1519
vars.synology_mode = "disk"
vars.synology_warning = host.vars.synology_hddtemp_warning || 43
vars.synology_critical = host.vars.synology_hddtemp_critical || 50
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi again,

I spent some minutes on further research on this topic and wanted to share the outcome with you.

The article What’s a Good Operating Temperature For My Synology? shares some numbers about Manufacturer Normal Internal Operating Ranges, which apparently are 0° – 65°C for HDD disks and 0°C to 70°C for SSD disks.

With kind regards,
Andreas.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following my reasoning in the comment above 1, I've kept the 43/50°C numbers here instead of increasing them to the official ranges supplied by the manufacturers.

For handing that information over to the user, I've added it to the inline documentation.

  /*
  CRITICAL when disk status is `SystemPartitionFailed` or `Crashed`.
  WARNING/CRITICAL when disk drive temperature is higher than °C.

  Official *Manufacturer Normal Internal Operating Ranges* are
  0° – 65°C for HDD disks and 0°C to 70°C for SSD disks.

  - https://www.hdsentinel.com/forum/viewtopic.php?f=32&t=1519
  - https://mariushosting.com/whats-a-good-operating-temperature-for-my-synology/
  */

Footnotes

  1. https://github.com/wernerfred/check_synology/pull/21#discussion_r825451178

Comment on lines 97 to 101
// Warn if system temperature is higher than °C.
// https://www.tomshardware.com/how-to/how-to-monitor-cpu-temp-temperature
vars.synology_mode = "status"
vars.synology_warning = host.vars.synology_temperature_warning || 65
vars.synology_critical = host.vars.synology_temperature_critical || 80
Copy link
Contributor Author

@amotl amotl Mar 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked another program, Synology status, written in Bash. It employs those default threshold values, which are applied to both system and disk temperatures.

warningTemperature="50"
criticalTemperature="60"

Those values resonate more with my gut feeling. Considering the screenshot above, I believe the system with 55°C might prove to have a failed fan already.

icinga2/synology-services.conf Outdated Show resolved Hide resolved
The goal is to provide resources to make installation effortless.
@amotl amotl marked this pull request as ready for review March 13, 2022 13:41
Copy link
Owner

@wernerfred wernerfred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the effort to provide usable configuration examples for every check mode of the plugin! I'm sure users will thank you every time they copy the files!

Any objections from your side? Otherwise i will merge.

@amotl
Copy link
Contributor Author

amotl commented Mar 14, 2022

Any objections from your side?

It's ready.

Otherwise i will merge.

Go ahead. Thank you again!

@wernerfred wernerfred merged commit ebb3c80 into wernerfred:master Mar 14, 2022
@amotl amotl deleted the full-configuration branch March 14, 2022 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants