真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

ndoutils數(shù)據(jù)不同步

最近倒騰了一下ndoutils這個工具,想把nagios的數(shù)據(jù)都倒進MySQL里,方便以后多個nagios主機的數(shù)據(jù)集中存儲到一個數(shù)據(jù)庫里,再取出來做數(shù)據(jù)對比和分析就很方便了。

創(chuàng)新互聯(lián)公司專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務,包含不限于成都網(wǎng)站設計、成都網(wǎng)站建設、薩迦網(wǎng)絡推廣、小程序開發(fā)、薩迦網(wǎng)絡營銷、薩迦企業(yè)策劃、薩迦品牌公關、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運營等,從售前售中售后,我們都將竭誠為您服務,您的肯定,是我們最大的嘉獎;創(chuàng)新互聯(lián)公司為所有大學生創(chuàng)業(yè)者提供薩迦建站搭建服務,24小時服務熱線:18980820575,官方網(wǎng)址:www.cdcxhl.com

安裝過程很順利,采用源碼安裝,make完之后直接拷貝配置文件和bin文件到對應目錄就可以了,網(wǎng)上能找到很多類似的教程。

最后運行的時候發(fā)現(xiàn)nagios的數(shù)據(jù)只有部分導入了數(shù)據(jù)庫,很多表都是空的,包括配置文件的數(shù)據(jù),實時的主機狀態(tài)和服務狀態(tài)的table也是數(shù)據(jù)不全。在配置上折騰了很長時間,反復對比過跟別人和官方的配置也找不出問題,debug文件也沒多少內容可看,都是一些mysql的執(zhí)行語句。

最后發(fā)現(xiàn)/var/log/messages文件里有這么一句,然后順著這提示來找解決方案,最終解決了問題。

這里分析一下:

ndo2db: Warning: Retrying message send. This can occur because you have too few messages allowed or too few total bytes allowed in message queues. You are currently using 64 of 16 messages and 65536 of 65536 bytes in the queue. See README for kernel tuning options.

上面這警告出現(xiàn)在系統(tǒng)日志里,然后網(wǎng)上也能搜出匹配的解決方案出來。

比如:http://bbs.ixdba.net/viewthread.php?tid=633

其實在源代碼文件夾里的README文件里最下面的內容就有提及了,我在安裝的時候配置完后直接就急著啟動,而沒有注意需要調系統(tǒng)參數(shù)

README文件里提到如下:

************************
TUNING KERNEL PARAMETERS
************************

NDOUTILS uses a single message queue to communicate between the broker
module and the NDO2DB daemon. Depending on the operating system, there
may be parameters that need to be tuned in order for this communication
to work correctly. The discussion below applies specifically to Linux,
but may apply generally to other Unices as well.

There are three Linux kernel parameters that determine the resources
provided to the messaging subsystem:
    * kernel.msgmax is the maximum size of a single message in a
        message queue
    * kernel.msgmni is the maximum number of messages allowed in any
        one message queue
    * kernel.msgmnb is the total number of bytes allow in all messages
        in any one message queue

To see the current values for any of these parameters, cat
/proc/sys/kernel/msg{max|mni|mnb}.

In order for NDOUTILS to work at all, kernel.msgmax must be greater than
the size of the queue_msg struct (currently 1026 bytes). Most Linux
distributions set kernel.msgmax to a default of 65536.

If there are insufficient resources for sending messages between the
broker and the daemon, you will see an entry similar to the following
in your logs. (This is logged via the syslog facility, using the level
LOG_ERR and the default facility.)

    ndo2db: Warning: Retrying message send. This can occur because
    you have too few messages allowed or too few total bytes
    allowed in message queues. You are currently using 16 of 16
    mesages and 65536 of 65536 bytes in the queue.  See README for
    kernel tuning options.

If you see this entry, the message will likely eventually be sent,
but retrying uses system resources, and there is the possibility that
more messages will queued than can be handled, causing the broker
module to stall.

If you are close to or have exceeded the number of messages, you may
need to increase kernel.msgmni. If you are close to or have exceeded
the number of bytes in the queue, you may need to increase
kernel.msgmnb. In some cases you may need to increase both.

A conservative approach would be to double the necessary value, stop
and restart both the NDO2DB daemon and Nagios Core, and watch for any
further messages. Note that if NDO2DB is started after Nagios Core,
you may see the warning above as the broker module first attempts to
flush its backlog of messages.

To increase a value, echo the value to /proc/sys/kernel/msgmni or
/proc/sys/kernel/msgmnb as appropriate.

For example, to increase the number of messages allowed in the queue
to 32, use the command 'echo 32 > /proc/sys/kernel/msgmni' (without
the quotes).

Once you have determine the correct parameters, you can make them
permanent by editing /etc/sysctl.conf. Add or update the line of
the form 'kernel.msg{mni|mnb} = ' with the value(s) determined
above. The next time the system is booted, the values of the
parameters in /etc/sysctl.conf will be loaded.

解決方法:

在/etc/sysctl.conf里加上

# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 131072000

# Controls the maximum size of a message, in bytes
kernel.msgmax = 131072000

#kernel.msgmni is the maximum number of messages allowed in any one message queue
kernel.msgmni = 65536000


當前文章:ndoutils數(shù)據(jù)不同步
分享地址:http://weahome.cn/article/ishjoo.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部