91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

ndoutils 數據不同步

發布時間:2020-05-22 21:18:07 來源:網絡 閱讀:619 作者:brucetam322 欄目:移動開發

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

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

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

最后發現/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.

上面這警告出現在系統日志里,然后網上也能搜出匹配的解決方案出來。

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


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

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} = <value>' 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


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

临邑县| 韩城市| 巢湖市| 永福县| 宜宾市| 太仆寺旗| 东辽县| 正定县| 台南市| 高雄市| 永新县| 台中县| 封丘县| 拉孜县| 邯郸县| 远安县| 怀化市| 仲巴县| 大荔县| 体育| 巴彦县| 阳信县| 秭归县| 大方县| 固始县| 文昌市| 华容县| 六安市| 额敏县| 彭州市| 正阳县| 邢台市| 得荣县| 万盛区| 休宁县| 安宁市| 余姚市| 开阳县| 吴桥县| 张家港市| 泾源县|