Recently I am using icinga to deploy and monitor. After using icinga-pnp4 to deploy, the graphics showing historical data cannot be displayed, and an error message is reported:
The localhost directory does not exist, or the localhost directory is empty
After research, it was finally confirmed that it is Because the perfdata option is not turned on in the icinga configuration file icinga.cfg, icinga will not store historical data in the specified directory. You only need to open them all and restart the icinga service to display historical data graphics.
For the perfdata configuration items, remove the # in front, as follows:
958:process_performance_data=1
972:host_perfdata_command=pnp4-process-host-perfdata
973:service_perfdata_command=pnp4-process -service- perfdata
982:host_perfdata_file=/tmp/host-perfdata
983:service_perfdata_file=/tmp/service-perfdata
995:host_perfdata_file_template=[HOSTPERFDATA]t$TIMET$t$HOSTNAME $t$HOSTEXECUTIONTIME$ t$HOSTOUTPUT$t$HOSTPERFDATA$
996:service_perfdata_file_template=[SERVICEPERFDATA]t$TIMET$t$HOSTNAME$t$SERVICEDESC$t$SERVICEEXECUTIONTIME$t$SERVICELATENCY$t$SERVICEOUTPUT$t$SERVICEPERFDATA$
1007 :host_perfdata_file_mode=a
1008:service_perfdata_file_mode=a
1018:host_perfdata_file_processing_interval=0
1019:service_perfdata_file_processing_interval=0
1 028:host_perfdata_file_processing_command=process-host-perfdata-file
1029:service_perfdata_file_processing_command=process- service-perfdata-file
1040:host_perfdata_process_empty_results=1
1041:service_perfdata_process_empty_results=1