Refactoring: Changed remaining check parameters starting with an 's' to the new rules...
[check_mk.git] / .werks / 8350
blobd968d1075997765e16bbb7332d4cb09b5bfaa6ec
1 Title: Real-time checks: Introducing checking in one second resolution
2 Level: 2
3 Edition: cee
4 Component: cmc
5 Compatible: compat
6 Version: 1.2.7i4
7 Date: 1450274655
8 Class: feature
10 This release introduces a new feature named real-time checks. With the new
11 real-time checks it is possible to monitor specific things a lot shorter
12 intervals than the normal interval of 60 seconds.
14 This feature has mainly been developed to get detailed graphs for some values
15 which change often like for example the memory usage or CPU utilization. But
16 not only the performance data is updated in this interval. The complete service
17 state is updated which may also result in faster notifications.
19 The real-time checks are working like this: The core is listening on the network
20 for incoming real-time check results, which are basically UDP packets sent by
21 the agents in an interval of one second. This needs to be enabled using the
22 configuration option <i>Global Settings > Enable handling of Real-Time Checks</i>.
23 You need to configure the UDP port to listen on (6559 by default) and the secret
24 which is used to decrypt the real-time checks. This secret needs to be equal for
25 the Check_MK server and all agents which are sending real-time check results.
27 The agents need to be configured to send real-time check results. This can currently
28 be done for the Linux and Windows Agents. On linux you need to create a file
29 /etc/check_mk/real_time_checks.cfg with the following contents:
31 F+:/etc/check_mk/real_time_checks.cfg
32 RTC_TIMEOUT=90
33 RTC_PORT=6559
34 RTC_SECRET='hallo123'
35 RTC_SECTIONS=""
36 RTC_SECTIONS+="mem "
37 RTC_SECTIONS+="cpu "
38 F-:
40 It is a good idea to reduce permissions on this file because it contains the
41 real-time check secret which is shared between the Check_MK agent and the server
42 to encrypt the transfered data. For example <tt>chmod 640 /etc/check_mk/real_time_checks.cfg</tt>
43 is a good idea.
45 On Windows you need to add the following to the <tt>[global]</tt> section
46 of your check_mk.ini and restart the Check_MK service:
48 F+:check_mk.ini
49 realtime_port = 6559
50 realtime_sections = mem winperf
51 realtime_timeout = 90
52 passphrase = hallo123
53 F-:
55 The agent is working as usual, waiting for connections from the Check_MK server.
56 Once a Check_MK server is contacting the agent, the agent is responding with
57 it's regular response. Now, when real-time checks are enabled, the agent is
58 sending one UDP packet for each enabled section per second to the host address
59 which had queried the Check_MK agent, which is normally the Check_MK servers
60 address.
62 The data which can be processed as real-time check is limited, so we limit the
63 sections which can be sent as real-time checks. Currently you can enable only
64 the <tt>mem</tt> and <tt>cpu</tt> sections on linux and <tt>mem</tt> and
65 <tt>winperf</tt> on Windows systems. This might be extended in the future.
67 To get detailed graphs, you now need to configure your RRD databases to be able
68 to store these detailed information. This can be done via the ruleset 
69 <i>Host & Service Parameters > Monitoring Configuration > Configuration of RRD databases of services</i>.
71 You need to create a new rule and first need to ensure that you only apply the
72 rule to checks which get real-time check information as the RRDs of these
73 services need more disk space. So you should only select the CPU/Memory services
74 of hosts which are sending real-time check results.
75 Then you need to configure this rule to have a 1 second precision for a duration
76 of your choice.
78 Just one example configuration for having:
80 <ul>
81 <li>1 second resolution for 4 hours</li>
82 <li>1 minute resolution for 2 days</li>
83 <li>5 minute resolution for 10 days</li>
84 <li>30 minute resolution for 90 days</li>
85 <li>6 hour resolution for 4 years</li>
86 </ul>
88 You need to configure these numbers:
90 <ul>
91 <li>Step (precision):   1 sec.</li>
92 <li>RRA configuration:</li>
93 <li>50.0%, 1, 14400</li>
94 <li>50.0%, 60, 2880</li>
95 <li>50.0%, 300, 2880</li>
96 <li>50.0%, 1800, 4320</li>
97 <li>50.0%, 21600, 5840</li>
98 </ul>
100 After you configured this, you need to run <tt>cmk --convert-rrds -v</tt> to convert
101 the existing RRDs.
103 After the conversion has finished and processing of the real-time checks works
104 correctly, you should see the service state, output and graphs e.g. of the "CPU utilisation"
105 service updating in an interval of one second.