2017-04-06 50 views
0

我在ELK的本地安裝中安裝了elastalert。當我運行命令'elastalert-create-index'時,我得到了這個錯誤信息:Elastalert創建索引不起作用

Traceback (most recent call last): 
    File "C:\Python27\Scripts\elastalert-create-index-script.py", line 11, in <module> 
    load_entry_point('elastalert==0.1.8', 'console_scripts', 'elastalert-create-index')() 
    File "C:\Python27\Scripts\elastalert\create_index.py", line 83, in main 
    profile_name=args.profile) 
    File "C:\Python27\Scripts\elastalert\auth.py", line 24, in __call__ 
    aws_access_key=credentials.access_key, 
AttributeError: 'NoneType' object has no attribute 'access_key' 

任何想法?

回答

0

有同樣的問題,通過編輯config.yaml,設置主機/端口,並取消註釋es_username & es_password。

我們的ES實例是本地的,沒有密碼保護。仍然與默認用戶名&密碼(忽略它,我猜)。

不是一個修復,而是一種解決方法。

+0

github.com現在已經解決了問題。這是因爲將每個彈性搜索都視爲位於雲中。您可以在代碼中註釋掉調用aw鍵的行,然後再次編譯/安裝 –

0

這可能是由於一些可能的原因。

  1. elasticsearch可能無法運行 如果沒有,啓動elasticsearch
  2. 的elastalert版本可能與elasticsearch兼容。 elasticalert和elasticsearch的版本應該相同或至少接近。例如:如果elasticsearch版本是5.0.0,那麼elastalert版本也應該是5.0.0或者接近它的東西。
  3. 確保config.yaml中指定的主機和端口是正確的。
  4. 檢查訪問密鑰是否正確指定。