Monit starttimeout (#6213)

This commit is contained in:
spoutin 2022-12-27 11:28:21 -05:00 committed by GitHub
parent a9f4b4b520
commit ed7afdb77d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View File

@ -42,6 +42,13 @@
<advanced>true</advanced>
<help><![CDATA[The timeout for custom program checks.]]></help>
</field>
<field>
<id>service.starttimeout</id>
<label>Start Timeout</label>
<type>text</type>
<advanced>true</advanced>
<help><![CDATA[The timeout for custom program to start a service.]]></help>
</field>
<field>
<id>service.address</id>
<label>Address</label>

View File

@ -231,6 +231,13 @@
<MaximumValue>86400</MaximumValue>
<ValidationMessage>Program Timeout needs to be an integer value between 1 and 86400</ValidationMessage>>
</timeout>
<starttimeout type="IntegerField">
<default>30</default>
<Required>N</Required>
<MinimumValue>0</MinimumValue>
<MaximumValue>86400</MaximumValue>
<ValidationMessage>Start Delay needs to be an integer value between 0 and 86400</ValidationMessage>
</starttimeout>
<address type="HostnameField">
<Required>N</Required>
</address>

View File

@ -135,7 +135,7 @@ check {{ service.type }} {{ service.name }} {{ path }}
{% endfor %}
{% endif %}
{% if service.start|default('') != '' %}
start program = "{{ service.start }}"
start program = "{{ service.start }}" with timeout {{service.starttimeout|default('30')}} seconds
{% endif %}
{% if service.stop|default('') != '' %}
stop program = "{{ service.stop }}"