nagios数据更新不及时的问题-创新互联

配置nagios的时候发现一个问题,就是改变了某个主机或者服务的描述之后,在主页信息总是更新很慢,而且告警信息还是老的信息,重启多次 nagios甚至重启主机都没有解决,其实这些都是由于nagios每次关闭的时候都会保存数据到/usr/local/nagios/var /retention.dat这个文件中,然后启动的时候读取这个文件的数据,打开这个文件发现都是一些nagios各个监控对象的状态参数,如:

创新互联建站是一家专注于成都网站设计、成都做网站与策划设计,临沂网站建设哪家好?创新互联建站做网站,专注于网站建设十多年,网设计领域的专业建站公司;建站业务涵盖:临沂等地区。临沂做网站价格咨询:18980820575

host {
host_name=DianAn-MSR5400
alias=********
display_name=DianAn-MSR5400
modified_attributes=0
check_command=
check_period=24x7
notification_period=24x7
event_handler=
has_been_checked=0
check_execution_time=0.000
check_latency=0.056
check_type=0
current_state=0
last_state=0
last_hard_state=0
last_event_id=0
current_event_id=0
current_problem_id=0
last_problem_id=0
plugin_output=
long_plugin_output=
performance_data=
last_check=0
next_check=1323659506
check_options=0
current_attempt=1
max_attempts=1
normal_check_interval=1.000000
retry_check_interval=1.000000
state_type=1
last_state_change=1323659204
last_hard_state_change=1323659204
last_time_up=0
last_time_down=0
last_time_unreachable=0
notified_on_down=0
notified_on_unreachable=0
last_notification=0
current_notification_number=0
current_notification_id=0
notifications_enabled=1
problem_has_been_acknowledged=0
acknowledgement_type=0
active_checks_enabled=1
passive_checks_enabled=1
event_handler_enabled=1
flap_detection_enabled=0
failure_prediction_enabled=1
process_performance_data=1
obsess_over_host=1
is_flapping=0
percent_state_change=0.00
check_flapping_recovery_notification=0
state_history=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
}

从这些信息可以看出,nagios每次启动都能延续上次关闭前的状态,是读取了这个文件的内容所致,这对维护长期状态监测数据统计等工作有利,但也会造成 nagios启动慢和信息不能及时更新的问题,要及时更新数据,可以先stop nagios,删除掉相应的host部分,或者清空文件echo > /usr/local/nagios/var/retention.dat,然后再启动nagios即可。如果不想在nagios关闭前保存主机和服务的 状态信息,可以在nagios的配置主文件里找到retain_state_information,改为0即可。

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。

分享题目:nagios数据更新不及时的问题-创新互联
地址分享:https://www.cdcxhl.com/article8/dhhoop.html

成都网站建设公司_创新互联,为您提供移动网站建设外贸网站建设Google搜索引擎优化网站改版微信小程序

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

外贸网站建设