[nagios-nrpe-server] Add an override for unit file #3

Open
opened 2019-03-21 15:26:03 +01:00 by benpro · 0 comments
Contributor

Issue imported from forge.evolix.org on 2019-03-21 14:26:03

  • Project: ansible-roles
  • Issue: 2509
  • Tracker: Evolution
  • Status: Nouveau
  • Author: Benoît S.
  • Category: nagios-nrpe
  • Started at: 2019-01-12 00:00:00
  • Done ratio: 0
  • Created at: 2019-01-12 13:30:09
  • Updated at: 2019-01-12 13:30:09

I propose to add Restart=always because nagios-nrpe-server need to be always running.
The unit file uses OOMScoreAdjust=-500 to not to kill the service by OOMkill but it is sometimes useless as NRPE cannot fork:

Failed at step EXEC spawning /bin/rm: Cannot allocate memory

Adding Restart=always will keep relaunching the process if it fails due to memory allocation. By the time OOMkiller kills another process to free the RAM.

/etc/systemd/system/nagios-nrpe-server.service.d/override.conf:

[Service]
Restart=always
> **Issue imported from forge.evolix.org on 2019-03-21 14:26:03** > * Project: ansible-roles > * Issue: 2509 > * Tracker: Evolution > * Status: Nouveau > * Author: Benoît S. > * Category: nagios-nrpe > * Started at: 2019-01-12 00:00:00 > * Done ratio: 0 > * Created at: 2019-01-12 13:30:09 > * Updated at: 2019-01-12 13:30:09 I propose to add `Restart=always` because `nagios-nrpe-server` need to be always running. The unit file uses `OOMScoreAdjust=-500` to not to kill the service by OOMkill but it is sometimes useless as NRPE cannot fork: Failed at step EXEC spawning /bin/rm: Cannot allocate memory Adding `Restart=always` will keep relaunching the process if it fails due to memory allocation. By the time OOMkiller kills another process to free the RAM. /etc/systemd/system/nagios-nrpe-server.service.d/override.conf: [Service] Restart=always
benpro added the
enhancement
label 2019-08-14 10:15:03 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: evolix/ansible-roles#3
No description provided.