kubernetes - 在 GKE 上部署 Graylog
问题描述
我很难在 Google Kubernetes Engine 上部署 Graylog,我正在使用此配置https://github.com/aliasmee/kubernetes-graylog-cluster并进行了一些小的修改。我的 Graylog 服务器已启动,但在界面中显示此错误:
Error message
Request has been terminated
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.
Original Request
GET http://ES_IP:12900/system/sessions
Status code
undefined
Full error message
Error: Request has been terminated
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.
Graylog 日志除此之外没有任何特别的显示:
org.graylog.plugins.threatintel.tools.AdapterDisabledException: Spamhaus service is disabled, not starting (E)DROP adapter. To enable it please go to System / Configurations.
at org.graylog.plugins.threatintel.adapters.spamhaus.SpamhausEDROPDataAdapter.doStart(SpamhausEDROPDataAdapter.java:68) ~[?:?]
at org.graylog2.plugin.lookup.LookupDataAdapter.startUp(LookupDataAdapter.java:59) [graylog.jar:?]
at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62) [graylog.jar:?]
at com.google.common.util.concurrent.Callables$4.run(Callables.java:119) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
但最后:
2019-01-16 13:35:00,255 INFO : org.graylog2.bootstrap.ServerBootstrap - Graylog server up and running.
弹性搜索健康检查是绿色的,在 ES 和 Mongo 日志中没有问题。我怀疑与 Elastic Search 的连接存在问题。
curl http://ip_address:9200/_cluster/health\?pretty
{
"cluster_name" : "elasticsearch",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 4,
"active_shards" : 4,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
解决方案
阅读您分享的教程后,我能够确定 kubelet 需要使用参数 --allow-privileged 运行。
“Elasticsearch pod 需要一个 init-container 以特权模式运行,因此它可以设置一些 VM 选项。为此,kubelet 应该使用 args --allow-privileged 运行,否则 init-container 将无法运行。”
无法自定义或修改 kubelet 参数/参数,这里有一个功能请求:https ://issuetracker.google.com/118428580 ,因此可以在将来实现。
此外,如果您直接在节点上修改 kubelet,主节点可能会重置配置,并且不能保证配置将保持不变。
推荐阅读
- c# - 如何使用 LINQ 和 C# 从继承的类中选择所有列
- raspberry-pi - 如何使用端口在 PC 上打开 Rasperry IP
- javascript - javascript幻灯片的图像数组没有出现
- javascript - 条件表达式中的 JavaScript 标记类型 if
- java - 未使用 FirebaseMessaging 接收前台通知但在后台工作
- reactjs - 如何在组件树外的实用程序函数中使用 react-i18next?
- f# - 简单的添加函数来处理整数和浮点数
- c# - 如何禁用其他数据网格上的格式化等于列?
- c++ - 是否有直接获取 std::vector 元素大小的函数?
- javascript - Svelte and Sapper:带有隐藏元素的幻灯片