Compare commits
1 Commits
master
...
ee2f462494
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee2f462494 |
@@ -98,11 +98,6 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_ntp_3A_3Amonitoring_3A_3Aloki.html" title="puppet_classes::confdroid_ntp::monitoring::loki (puppet_class)">confdroid_ntp::monitoring::loki</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_ntp_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_ntp::monitoring::target (puppet_class)">confdroid_ntp::monitoring::target</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_ntp_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_ntp::monitoring::target (puppet_class)">confdroid_ntp::monitoring::target</a></span>
|
||||||
|
|
||||||
|
|||||||
@@ -78,21 +78,14 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::confdroid_ntp::monitoring::loki" class="odd">
|
<li id="object_puppet_classes::confdroid_ntp::monitoring::target" class="odd">
|
||||||
<div class="item">
|
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_ntp_3A_3Amonitoring_3A_3Aloki.html" title="puppet_classes::confdroid_ntp::monitoring::loki (puppet_class)">confdroid_ntp::monitoring::loki</a></span>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::confdroid_ntp::monitoring::target" class="even">
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_ntp_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_ntp::monitoring::target (puppet_class)">confdroid_ntp::monitoring::target</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_ntp_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_ntp::monitoring::target (puppet_class)">confdroid_ntp::monitoring::target</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::confdroid_ntp::params" class="odd">
|
<li id="object_puppet_classes::confdroid_ntp::params" class="even">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_ntp_3A_3Aparams.html" title="puppet_classes::confdroid_ntp::params (puppet_class)">confdroid_ntp::params</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_ntp_3A_3Aparams.html" title="puppet_classes::confdroid_ntp::params (puppet_class)">confdroid_ntp::params</a></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -109,11 +109,7 @@
|
|||||||
11
|
11
|
||||||
12
|
12
|
||||||
13
|
13
|
||||||
14
|
14</pre>
|
||||||
15
|
|
||||||
16
|
|
||||||
17
|
|
||||||
18</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 6</span>
|
||||||
@@ -123,13 +119,9 @@ class confdroid_ntp::main::config (
|
|||||||
) inherits confdroid_ntp::params {
|
) inherits confdroid_ntp::params {
|
||||||
include confdroid_ntp::main::service
|
include confdroid_ntp::main::service
|
||||||
|
|
||||||
if $cy_manage_nagios == true {
|
# if $ay_manage_nagios == true {
|
||||||
include confdroid_ntp::monitoring::target
|
# include confdroid_ntp::monitoring::target
|
||||||
}
|
# }
|
||||||
|
|
||||||
if $cy_manage_loki == true {
|
|
||||||
include confdroid_ntp::monitoring::loki
|
|
||||||
}
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -129,31 +129,7 @@
|
|||||||
31
|
31
|
||||||
32
|
32
|
||||||
33
|
33
|
||||||
34
|
34</pre>
|
||||||
35
|
|
||||||
36
|
|
||||||
37
|
|
||||||
38
|
|
||||||
39
|
|
||||||
40
|
|
||||||
41
|
|
||||||
42
|
|
||||||
43
|
|
||||||
44
|
|
||||||
45
|
|
||||||
46
|
|
||||||
47
|
|
||||||
48
|
|
||||||
49
|
|
||||||
50
|
|
||||||
51
|
|
||||||
52
|
|
||||||
53
|
|
||||||
54
|
|
||||||
55
|
|
||||||
56
|
|
||||||
57
|
|
||||||
58</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
||||||
@@ -171,7 +147,7 @@ class confdroid_ntp::main::dirs (
|
|||||||
mode => '0750',
|
mode => '0750',
|
||||||
selrange => s0,
|
selrange => s0,
|
||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => chronyd_var_log_t,
|
seltype => chrony_var_log_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,31 +159,7 @@ class confdroid_ntp::main::dirs (
|
|||||||
mode => '0750',
|
mode => '0750',
|
||||||
selrange => s0,
|
selrange => s0,
|
||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => chronyd_var_lib_t,
|
seltype => chrony_var_lib_t,
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
|
|
||||||
# /run/chrony
|
|
||||||
file { '/run/chrony':
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'chrony',
|
|
||||||
group => 'chrony',
|
|
||||||
mode => '0750',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => chronyd_var_run_t,
|
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
|
|
||||||
# /run/chrony-dhcp
|
|
||||||
file { '/run/chrony-dhcp':
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0755',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => chronyd_var_run_t,
|
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
|
|||||||
@@ -123,28 +123,7 @@
|
|||||||
25
|
25
|
||||||
26
|
26
|
||||||
27
|
27
|
||||||
28
|
28</pre>
|
||||||
29
|
|
||||||
30
|
|
||||||
31
|
|
||||||
32
|
|
||||||
33
|
|
||||||
34
|
|
||||||
35
|
|
||||||
36
|
|
||||||
37
|
|
||||||
38
|
|
||||||
39
|
|
||||||
40
|
|
||||||
41
|
|
||||||
42
|
|
||||||
43
|
|
||||||
44
|
|
||||||
45
|
|
||||||
46
|
|
||||||
47
|
|
||||||
48
|
|
||||||
49</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
||||||
@@ -169,29 +148,8 @@ class confdroid_ntp::main::files (
|
|||||||
}
|
}
|
||||||
|
|
||||||
# drift file /var/lib/chrony/drift
|
# drift file /var/lib/chrony/drift
|
||||||
file { $cy_drift_file:
|
|
||||||
ensure => file,
|
|
||||||
owner => 'chrony',
|
|
||||||
group => 'chrony',
|
|
||||||
mode => '0644',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => chronyd_var_lib_t,
|
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
|
|
||||||
# log rotation
|
# log rotation
|
||||||
file { $cy_logrotate_file:
|
|
||||||
ensure => file,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0644',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => etc_t,
|
|
||||||
seluser => system_u,
|
|
||||||
content => template($cy_logrotate_erb),
|
|
||||||
}
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,138 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>
|
|
||||||
Puppet Class: confdroid_ntp::monitoring::loki
|
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
|
||||||
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
pathId = "puppet_classes::confdroid_ntp::monitoring::loki";
|
|
||||||
relpath = '../';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="nav_wrap">
|
|
||||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
|
||||||
<div id="resizer"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="main" tabindex="-1">
|
|
||||||
<div id="header">
|
|
||||||
<div id="menu">
|
|
||||||
|
|
||||||
<a href="../_index.html">Index (c)</a> »
|
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
|
||||||
»
|
|
||||||
<span class="title">confdroid_ntp::monitoring::loki</span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="search">
|
|
||||||
|
|
||||||
<a class="full_list_link" id="puppet_class_list_link"
|
|
||||||
href="../puppet_class_list.html">
|
|
||||||
|
|
||||||
<svg width="24" height="24">
|
|
||||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
||||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
||||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: confdroid_ntp::monitoring::loki</h1>
|
|
||||||
<div class="box_info">
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>Inherits:</dt>
|
|
||||||
<dd><span class='object_link'><a href="confdroid_ntp_3A_3Aparams.html" title="puppet_classes::confdroid_ntp::params (puppet_class)">confdroid_ntp::params</a></span></dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>Defined in:</dt>
|
|
||||||
<dd>
|
|
||||||
manifests/monitoring/loki.pp
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h2>Summary</h2>
|
|
||||||
Class manages loki monitoring for the confdroid_ntp services
|
|
||||||
|
|
||||||
<h2>Overview</h2>
|
|
||||||
<div class="docstring">
|
|
||||||
<div class="discussion">
|
|
||||||
|
|
||||||
<p>confdroid_ntp::monitoring::loki.pp Module name: confdroid_ntp Author: 12ww1160 (12ww1160@confdroid.com)</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="tags">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div><div class="method_details_list">
|
|
||||||
<table class="source_code">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<pre class="lines">
|
|
||||||
|
|
||||||
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
10
|
|
||||||
11
|
|
||||||
12
|
|
||||||
13
|
|
||||||
14</pre>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<pre class="code"><span class="info file"># File 'manifests/monitoring/loki.pp', line 6</span>
|
|
||||||
|
|
||||||
class confdroid_ntp::monitoring::loki (
|
|
||||||
|
|
||||||
) inherits confdroid_ntp::params {
|
|
||||||
if $cy_manage_loki == true {
|
|
||||||
confdroid_alloy::monitoring::log_targets { "confdroid_ntp_${fqdn}":
|
|
||||||
targets => ['/var/log/chrony'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}</pre>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="footer">
|
|
||||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -104,21 +104,7 @@
|
|||||||
6
|
6
|
||||||
7
|
7
|
||||||
8
|
8
|
||||||
9
|
9</pre>
|
||||||
10
|
|
||||||
11
|
|
||||||
12
|
|
||||||
13
|
|
||||||
14
|
|
||||||
15
|
|
||||||
16
|
|
||||||
17
|
|
||||||
18
|
|
||||||
19
|
|
||||||
20
|
|
||||||
21
|
|
||||||
22
|
|
||||||
23</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/monitoring/target.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/monitoring/target.pp', line 6</span>
|
||||||
@@ -126,20 +112,6 @@
|
|||||||
class confdroid_ntp::monitoring::target (
|
class confdroid_ntp::monitoring::target (
|
||||||
|
|
||||||
) inherits confdroid_ntp::params {
|
) inherits confdroid_ntp::params {
|
||||||
if $cy_manage_nagios == true {
|
|
||||||
@@nagios_service { "check_chronyd_${fqdn}":
|
|
||||||
check_command => "check_nrpe!check_chronyd!${cy_procs_allowed}!chronyd",
|
|
||||||
use => 'generic-service',
|
|
||||||
host_name => $fqdn,
|
|
||||||
notification_period => '24x7',
|
|
||||||
service_description => "${fqdn}_check_chronyd",
|
|
||||||
target => $cy_target_service,
|
|
||||||
owner => 'nagios',
|
|
||||||
group => 'nagios',
|
|
||||||
mode => '0640',
|
|
||||||
contacts => $cy_target_contacts,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -77,8 +77,6 @@
|
|||||||
|
|
||||||
<span class='object_link'><a href="confdroid_ntp_3A_3Amain_3A_3Aservice.html" title="puppet_classes::confdroid_ntp::main::service (puppet_class)">confdroid_ntp::main::service</a></span><br/>
|
<span class='object_link'><a href="confdroid_ntp_3A_3Amain_3A_3Aservice.html" title="puppet_classes::confdroid_ntp::main::service (puppet_class)">confdroid_ntp::main::service</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="confdroid_ntp_3A_3Amonitoring_3A_3Aloki.html" title="puppet_classes::confdroid_ntp::monitoring::loki (puppet_class)">confdroid_ntp::monitoring::loki</a></span><br/>
|
|
||||||
|
|
||||||
<span class='object_link'><a href="confdroid_ntp_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_ntp::monitoring::target (puppet_class)">confdroid_ntp::monitoring::target</a></span><br/>
|
<span class='object_link'><a href="confdroid_ntp_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_ntp::monitoring::target (puppet_class)">confdroid_ntp::monitoring::target</a></span><br/>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
@@ -286,96 +284,6 @@
|
|||||||
—
|
—
|
||||||
<div class='inline'>
|
<div class='inline'>
|
||||||
<p>Whether to use a local LAN server or external pool.</p>
|
<p>Whether to use a local LAN server or external pool.</p>
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>cy_manage_nagios</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>false</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>Whether to manage Nagios monitoring for the module.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>cy_procs_allowed</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'1:'</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>Number of allowed processes for the Nagios check.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>cy_target_service</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'/etc/nagios/conf.d/chronyd_service.cfg'</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>Path to the Nagios service configuration file.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>cy_target_contacts</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>Array</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>['nagiosadmin']</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>List of Nagios contacts for notifications. must exist in Nagios contacts configuration!</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>cy_manage_loki</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>false</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>Whether to manage Loki logging for the module.</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@@ -391,6 +299,12 @@
|
|||||||
<pre class="lines">
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
|
22
|
||||||
|
23
|
||||||
|
24
|
||||||
|
25
|
||||||
|
26
|
||||||
|
27
|
||||||
28
|
28
|
||||||
29
|
29
|
||||||
30
|
30
|
||||||
@@ -419,28 +333,10 @@
|
|||||||
53
|
53
|
||||||
54
|
54
|
||||||
55
|
55
|
||||||
56
|
56</pre>
|
||||||
57
|
|
||||||
58
|
|
||||||
59
|
|
||||||
60
|
|
||||||
61
|
|
||||||
62
|
|
||||||
63
|
|
||||||
64
|
|
||||||
65
|
|
||||||
66
|
|
||||||
67
|
|
||||||
68
|
|
||||||
69
|
|
||||||
70
|
|
||||||
71
|
|
||||||
72
|
|
||||||
73
|
|
||||||
74</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 28</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 22</span>
|
||||||
|
|
||||||
class confdroid_ntp::params (
|
class confdroid_ntp::params (
|
||||||
|
|
||||||
@@ -458,15 +354,6 @@ class confdroid_ntp::params (
|
|||||||
String $cy_leapsectz = 'right/UTC',
|
String $cy_leapsectz = 'right/UTC',
|
||||||
String $cy_loginfo = 'measurements statistics tracking',
|
String $cy_loginfo = 'measurements statistics tracking',
|
||||||
|
|
||||||
# monitoring
|
|
||||||
Boolean $cy_manage_nagios = false,
|
|
||||||
String $cy_procs_allowed = '1:',
|
|
||||||
String $cy_target_service = '/etc/nagios/conf.d/chronyd_service.cfg',
|
|
||||||
Array $cy_target_contacts = ['nagiosadmin'],
|
|
||||||
|
|
||||||
# loki
|
|
||||||
Boolean $cy_manage_loki = false,
|
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# facts
|
# facts
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
@@ -479,9 +366,6 @@ class confdroid_ntp::params (
|
|||||||
# files
|
# files
|
||||||
$cy_conf_file = '/etc/chrony.conf'
|
$cy_conf_file = '/etc/chrony.conf'
|
||||||
$cy_conf_erb = 'confdroid_ntp/chrony.conf.erb'
|
$cy_conf_erb = 'confdroid_ntp/chrony.conf.erb'
|
||||||
$cy_drift_file = '/var/lib/chrony/drift'
|
|
||||||
$cy_logrotate_file = '/etc/logrotate.d/chrony'
|
|
||||||
$cy_logrotate_erb = 'confdroid_ntp/logrotate.chrony.erb'
|
|
||||||
|
|
||||||
# service
|
# service
|
||||||
$cy_service = 'chronyd'
|
$cy_service = 'chronyd'
|
||||||
|
|||||||
@@ -8,11 +8,7 @@ class confdroid_ntp::main::config (
|
|||||||
) inherits confdroid_ntp::params {
|
) inherits confdroid_ntp::params {
|
||||||
include confdroid_ntp::main::service
|
include confdroid_ntp::main::service
|
||||||
|
|
||||||
if $cy_manage_nagios == true {
|
# if $ay_manage_nagios == true {
|
||||||
include confdroid_ntp::monitoring::target
|
# include confdroid_ntp::monitoring::target
|
||||||
}
|
# }
|
||||||
|
|
||||||
if $cy_manage_loki == true {
|
|
||||||
include confdroid_ntp::monitoring::loki
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class confdroid_ntp::main::dirs (
|
|||||||
mode => '0750',
|
mode => '0750',
|
||||||
selrange => s0,
|
selrange => s0,
|
||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => chronyd_var_log_t,
|
seltype => chrony_var_log_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,31 +28,7 @@ class confdroid_ntp::main::dirs (
|
|||||||
mode => '0750',
|
mode => '0750',
|
||||||
selrange => s0,
|
selrange => s0,
|
||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => chronyd_var_lib_t,
|
seltype => chrony_var_lib_t,
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
|
|
||||||
# /run/chrony
|
|
||||||
file { '/run/chrony':
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'chrony',
|
|
||||||
group => 'chrony',
|
|
||||||
mode => '0750',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => chronyd_var_run_t,
|
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
|
|
||||||
# /run/chrony-dhcp
|
|
||||||
file { '/run/chrony-dhcp':
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0755',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => chronyd_var_run_t,
|
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,27 +23,6 @@ class confdroid_ntp::main::files (
|
|||||||
}
|
}
|
||||||
|
|
||||||
# drift file /var/lib/chrony/drift
|
# drift file /var/lib/chrony/drift
|
||||||
file { $cy_drift_file:
|
|
||||||
ensure => file,
|
|
||||||
owner => 'chrony',
|
|
||||||
group => 'chrony',
|
|
||||||
mode => '0644',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => chronyd_var_lib_t,
|
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
|
|
||||||
# log rotation
|
# log rotation
|
||||||
file { $cy_logrotate_file:
|
|
||||||
ensure => file,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0644',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => etc_t,
|
|
||||||
seluser => system_u,
|
|
||||||
content => template($cy_logrotate_erb),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
#### confdroid_ntp::monitoring::loki.pp
|
|
||||||
# Module name: confdroid_ntp
|
|
||||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
|
||||||
# @summary Class manages loki monitoring for the confdroid_ntp services
|
|
||||||
###############################################################################
|
|
||||||
class confdroid_ntp::monitoring::loki (
|
|
||||||
|
|
||||||
) inherits confdroid_ntp::params {
|
|
||||||
if $cy_manage_loki == true {
|
|
||||||
confdroid_alloy::monitoring::log_targets { "confdroid_ntp_${fqdn}":
|
|
||||||
targets => ['/var/log/chrony'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,18 +6,4 @@
|
|||||||
class confdroid_ntp::monitoring::target (
|
class confdroid_ntp::monitoring::target (
|
||||||
|
|
||||||
) inherits confdroid_ntp::params {
|
) inherits confdroid_ntp::params {
|
||||||
if $cy_manage_nagios == true {
|
|
||||||
@@nagios_service { "check_chronyd_${fqdn}":
|
|
||||||
check_command => "check_nrpe!check_chronyd!${cy_procs_allowed}!chronyd",
|
|
||||||
use => 'generic-service',
|
|
||||||
host_name => $fqdn,
|
|
||||||
notification_period => '24x7',
|
|
||||||
service_description => "${fqdn}_check_chronyd",
|
|
||||||
target => $cy_target_service,
|
|
||||||
owner => 'nagios',
|
|
||||||
group => 'nagios',
|
|
||||||
mode => '0640',
|
|
||||||
contacts => $cy_target_contacts,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,12 +18,6 @@
|
|||||||
# @param [String] cy_loginfo Log information to record. Valid values are
|
# @param [String] cy_loginfo Log information to record. Valid values are
|
||||||
# 'measurements', 'statistics', and 'tracking'.
|
# 'measurements', 'statistics', and 'tracking'.
|
||||||
# @param [Boolean] cy_use_lan_server Whether to use a local LAN server or external pool.
|
# @param [Boolean] cy_use_lan_server Whether to use a local LAN server or external pool.
|
||||||
# @param [Boolean] cy_manage_nagios Whether to manage Nagios monitoring for the module.
|
|
||||||
# @param [String] cy_procs_allowed Number of allowed processes for the Nagios check.
|
|
||||||
# @param [String] cy_target_service Path to the Nagios service configuration file.
|
|
||||||
# @param [Array] cy_target_contacts List of Nagios contacts for notifications.
|
|
||||||
# must exist in Nagios contacts configuration!
|
|
||||||
# @param [Boolean] cy_manage_loki Whether to manage Loki logging for the module.
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class confdroid_ntp::params (
|
class confdroid_ntp::params (
|
||||||
|
|
||||||
@@ -41,15 +35,6 @@ class confdroid_ntp::params (
|
|||||||
String $cy_leapsectz = 'right/UTC',
|
String $cy_leapsectz = 'right/UTC',
|
||||||
String $cy_loginfo = 'measurements statistics tracking',
|
String $cy_loginfo = 'measurements statistics tracking',
|
||||||
|
|
||||||
# monitoring
|
|
||||||
Boolean $cy_manage_nagios = false,
|
|
||||||
String $cy_procs_allowed = '1:',
|
|
||||||
String $cy_target_service = '/etc/nagios/conf.d/chronyd_service.cfg',
|
|
||||||
Array $cy_target_contacts = ['nagiosadmin'],
|
|
||||||
|
|
||||||
# loki
|
|
||||||
Boolean $cy_manage_loki = false,
|
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# facts
|
# facts
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
@@ -62,9 +47,6 @@ class confdroid_ntp::params (
|
|||||||
# files
|
# files
|
||||||
$cy_conf_file = '/etc/chrony.conf'
|
$cy_conf_file = '/etc/chrony.conf'
|
||||||
$cy_conf_erb = 'confdroid_ntp/chrony.conf.erb'
|
$cy_conf_erb = 'confdroid_ntp/chrony.conf.erb'
|
||||||
$cy_drift_file = '/var/lib/chrony/drift'
|
|
||||||
$cy_logrotate_file = '/etc/logrotate.d/chrony'
|
|
||||||
$cy_logrotate_erb = 'confdroid_ntp/logrotate.chrony.erb'
|
|
||||||
|
|
||||||
# service
|
# service
|
||||||
$cy_service = 'chronyd'
|
$cy_service = 'chronyd'
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
# file created by Puppet, manual changes will be overwritten
|
|
||||||
/var/log/chrony/*.log {
|
|
||||||
missingok
|
|
||||||
nocreate
|
|
||||||
sharedscripts
|
|
||||||
postrotate
|
|
||||||
/usr/bin/chronyc cyclelogs > /dev/null 2>&1 || true
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user