flant / curator-opensearch

Curator for OpenSearch.
Other
76 stars 28 forks source link

blacklist option not exposed to the cli #1

Closed ynuyasha closed 2 years ago

ynuyasha commented 2 years ago

If i using curator_cli actually i can't suppress warning logs from ssl-no-validate option. Example:

curator_cli --loglevel ERROR --use_ssl --ssl-no-validate --username admin --password admin delete-indices --ignore_empty_list --filter_list '[{"filtertype":"pattern","kind":"regex","value":"^.*_log-.*$"},{"filtertype":"age","source":"name","direction":"older","timestring":"%Y.%m.%d","unit":"days","unit_count":"15"}]'

ouput log:

/usr/local/lib/python3.6/dist-packages/opensearchpy/connection/http_requests.py:145: UserWarning: Connecting to https://127.0.0.1:9200 using SSL with verify_certs=False is insecure. % self.host /usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning,

but with curator you can do with yml file

uzhinskiy commented 2 years ago

Hi Antonio! Thank you for your report! I'll check it asap.

uzhinskiy commented 2 years ago

In the new release '0.0.5' , added an option --ssl-show-warn to show warnings :

curator_cli --loglevel ERROR --use_ssl --ssl-no-validate --ssl-show-warn delete-indices --filter_list '[{"filtertype":"pattern","kind":"regex","value":"^.*_log-.*$"},{"filtertype":"age","source":"name","direction":"older","timestring":"%Y.%m.%d","unit":"days","unit_count":"15"}]'
/usr/local/lib/python3.8/dist-packages/opensearchpy/connection/http_requests.py:143: UserWarning: Connecting to https://127.0.0.1:9200 using SSL with verify_certs=False is insecure.

Without this option warning messages are suppressed.

https://pypi.org/project/curator-opensearch/