在GKE上部署Graylog

时间:2019-01-16 13:59:15

标签: kubernetes google-kubernetes-engine graylog2 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
}

1 个答案:

答案 0 :(得分:1)

阅读共享教程后,我能够确定kubelet需要使用--allow-privileged参数运行。

  

“ Elasticsearch pod需要一个init容器在特权模式下运行,因此它可以设置一些VM选项。为此,kubelet应该与args --allow-privileged一起运行,否则init-container将运行无法运行。”

无法自定义或修改kubelet参数/参数,这里有一个功能请求:https://issuetracker.google.com/118428580,因此可以在将来实现。

另外,如果您直接在节点上修改kubelet,则主服务器可能会重置配置,并且不能保证配置将是持久的。