The check_km document does not see how to modify the passive check interval. However, it is found that the check_interval variable in icinga can be set in the service.
Add this variable to the CPU load settings in check_mk_objects.cfg:
Define Service {use check_mk_passive_perf host_name staticfileserver service_description CPU load check_command check_mk-cpu.loads check_interval 0.05}
Because the unit is minute, 0.05 is used to indicate the 3-second interval.
Then restart icinga.
Service icinga restart
The display interval on the Web page is 3 seconds.
To change the monitoring interval of all services, you can modify the service named check_mk_default in the Conf. d/check_mk_templates.cfg file:
# Template used by all other check_mk templates define service {name check_mk_default register 0 limit 1 limit 1 parall1_e_check 1 limit 1 check_freshness 0 ications_enabled 1 limit 0 limit 1 limit 0 limit 1 limit 1 interval ication_interval 0 is_volatile 0 normal_check_interval 0.05 retry_check_interval 0.05 max_check_attempts 1 notification_options U, c, W, R, F, S icationication_period 24x7 check_period 24x7}
Previously, normal_check_ineterval and retry_check_interval were modified to 0.05 minutes.
Modify the icinga. cfg file:
Command_check_interval = 1 s
External_command_buffer_slots = 32768
Add logs:
Log_external_commands = 1log_passive_checks = 1
View logs after restarting:
Use the grep command to filter out the cpuload monitoring log of a server:
. /Icinga. log: 127508: [1369051243] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 127538: [1369051247] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 127585: [1369051252] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 127631: [1369051257] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 127677: [1369051262] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 127724: [1369051267] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 127770: [1369051272] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 127832: [1369051278] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 127878: [1369051283] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 127909: [1369051287] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 127955: [1369051292] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 128002: [1369051297] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 128048: [1369051302] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs. /icinga. log: 128125: [1369051309] passive service check: staticfileserver; CPU load; 0; OK-15 min load 0.05 at 4 CPUs
We can see that the last few messages are separated by 4-6 seconds. The modification has been achieved.
This is the global setting. All service checks are changed to 3 s intervals. But can I change the interval of only one service? I tried to put the following configuration in a separate service, and the global configuration is still 1 minute:
Normal_check_interval 0.05 retry_check_interval 0.05
The log shows that the interval is still 60 seconds, even though the web page shows 3 seconds.
| Service normal/retry Check Interval |
3 S/3 S |
Conclusion:
1. Currently, only the global modification method is found, and the modification to a service is invalid.
2. There is no pressure on the server CPU load, so the actual effect is not displayed. Stress tests are also required to prove this.