# curl http://localhost:9200/_cat/indices
yellow open .wazuh 52jUNhPcRmu7Gllov1wvHg 5 1 1 0 10.4kb 10.4kb
green open wazuh-alerts-3.x-2018.05.22 dlSFaWysSLOccpU8C0ERNw 1 0 10437 0 2.2mb 2.2mb
yellow open .wazuh-version hARpeYzJRnavRf_Mv1H4dA 1 1 1 0 5.1kb 5.1kb
green open wazuh-monitoring-3.x-2018.05.22 YrECiOihQx6aURuoJxiVuw 1 0 94 0 50.6kb 50.6kb
yellow open .kibana bZLFpfp3TdiYpVsYXi88WA 5 1 266 1 244.3kb 244.3kb
curl "http://localhost:9200/_template/wazuh?pretty&filter_path=wazuh.settings"
{
"wazuh" : {
"settings" : {
"index" : {
"number_of_shards" : "1",
"number_of_replicas" : "0",
"refresh_interval" : "5s"
}
}
}
}
Thanks,
SR
systemctl stop kibana# Configure .wazuh and .wazuh-version indices shards and replicas.
#wazuh.shards : 1
#wazuh.replicas : 1
#wazuh-version.shards : 1
#wazuh-version.replicas: 1# Configure .wazuh and .wazuh-version indices shards and replicas.
wazuh.shards : 1
wazuh.replicas : 0
wazuh-version.shards : 1
wazuh-version.replicas: 0curl -XDELETE localhost:9200/.wazuh
curl -XDELETE localhost:9200/.wazuh-versionrm -rf /usr/share/kibana/optimize/bundlessystemctl restart kibanacurl -XGET localhost:9200/_cat/indices?vsystemctl stop kibana# systemctl stop kibana
# Configure .wazuh and .wazuh-version indices shards and replicas.
#wazuh.shards : 1
#wazuh.replicas : 1
#wazuh-version.shards : 1
#wazuh-version.replicas: 1# Configure .wazuh and .wazuh-version indices shards and replicas.
wazuh.shards : 1
wazuh.replicas : 0
wazuh-version.shards : 1
wazuh-version.replicas: 0curl -XDELETE localhost:9200/.wazuh
curl -XDELETE localhost:9200/.wazuh-version[root@wazuh-xxx vol1]# curl -XDELETE localhost:9200/.wazuh
{"acknowledged":true}[root@wazuh-xxx vol1]# curl -XDELETE localhost:9200/.wazuh-version
{"acknowledged":true}[root@wazuhcurl -XGET localhost:9200/_cat/indices?v
# curl -XGET localhost:9200/_cat/indices?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open wazuh-alerts-3.x-2018.05.22 dlSFaWysSLOccpU8C0ERNw 1 0 11109 0 2.4mb 2.4mb
green open wazuh-alerts-3.x-2018.05.23 k_Y0LzKzQaSkfGKOKrKsmQ 1 0 1346 0 422.9kb 422.9kb
green open .kibana ATyMQTr5RTGI3DaR_Tfcxw 1 0 266 156 236kb 236kb
green open wazuh-monitoring-3.x-2018.05.22 YrECiOihQx6aURuoJxiVuw 1 0 106 0 145.4kb 145.4kb
green open wazuh-monitoring-3.x-2018.05.23 j0UgIjiGQLeFoOFlLLL9xQ 1 0 52 0 134.9kb 134.9kb
rm -rf /usr/share/kibana/optimize/bundlesrm -rf /usr/share/kibana/optimize/bundle
systemctl restart kibana# systemctl restart kibana
curl -XGET localhost:9200/_cat/indices?v# curl -XGET localhost:9200/_cat/indices?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open .wazuh-version 62QoWvTDR_CiRZZTe52itQ 1 1 1 0 5kb 5kb
green open wazuh-alerts-3.x-2018.05.22 dlSFaWysSLOccpU8C0ERNw 1 0 11109 0 2.4mb 2.4mb
green open wazuh-alerts-3.x-2018.05.23 k_Y0LzKzQaSkfGKOKrKsmQ 1 0 1346 0 422.9kb 422.9kb
yellow open .wazuh A2IfkcTQSlG8g8Wx4iqJAw 1 1 0 0 230b 230b
green open .kibana ATyMQTr5RTGI3DaR_Tfcxw 1 0 266 156 236.2kb 236.2kb
green open wazuh-monitoring-3.x-2018.05.22 YrECiOihQx6aURuoJxiVuw 1 0 106 0 145.4kb 145.4kb
green open wazuh-monitoring-3.x-2018.05.23 j0UgIjiGQLeFoOFlLLL9xQ 1 0 52 0 135kb 135kb
cat /usr/share/kibana/plugins/wazuh/package.json# cat /usr/share/kibana/plugins/wazuh/package.json
{
"name": "wazuh",
"version": "3.2.1",
"revision": "0387",
"kibana": {
"version": "6.2.3"
},
"description": "Wazuh App",
"main": "index.js",
"keywords": [
"kibana",
"wazuh",
"ossec"
],
"author": "Wazuh, Inc",
"license": "GPL-2.0",
"repository": {
"type": "git",
"url": "https://github.com/wazuh/wazuh-kibana-app.git"
},
"bugs": {
"url": "https://github.com/wazuh/wazuh-kibana-app/issues"
},
"homepage": "https://www.wazuh.com/",
"dependencies": {
"angular-animate": "1.6.5",
"angular-aria": "1.6.5",
"angular-cookies": "1.6.5",
"angular-material": "1.1.1",
"angular-md5": "^0.1.10",
"ansicolors": "^0.3.2",
"install": "^0.10.1",
"js-yaml": "3.10.0",
"lodash": "3.10.1",
"needle": "^2.0.1",
"node-cron": "^1.1.2",
"winston": "3.0.0-rc1"
}
}
Thanks,
SR
cat /usr/share/kibana/plugins/wazuh/package.json
{
"name": "wazuh",
"version": "3.2.2",
"revision": "0390",
"kibana": {
"version": "6.2.4"
},
"description": "Wazuh app",
"rison": "^0.1.1",
"winston": "3.0.0-rc1"
}
}
green open wazuh-alerts-3.x-2018.06.01 -1BJwkL8RWCWXmqVKziGLg 1 0 26 0 80.3kb 80.3kb
green open wazuh-monitoring-3.x-2018.05.29 vxOmgsQkQDO_am9_xyiQtA 5 0 18 0 234.9kb 234.9kb
green open wazuh-monitoring-3.x-2018.06.01 x-vf1ipHTGSfSSEY-BvB1A 1 0 88 0 147kb 147kb
green open .wazuh MzEnbzGNSXWEGbG-k-jGjg 5 0 1 0 10.6kb 10.6kb
green open wazuh-alerts-3.x-2018.05.31 o3ooag18T7SYdCH2HlqWQg 5 0 162 0 585kb 585kb
green open wazuh-alerts-3.x-2018.05.29 0Zs-wZV2RR6Jb2pVYkRtzQ 5 0 1689 1 979.9kb 979.9kb
green open wazuh-alerts-3.x-2018.05.30 soeBr7r5RTqxNkl8YB8rHA 5 0 5418 0 1.7mb 1.7mb
green open .wazuh-version 71Br8yFNT9CsZK18A9bczw 1 0 1 0 5.1kb 5.1kb
green open wazuh-monitoring-3.x-2018.05.31 7JrRsDBfT7GG65xPwB6Rhg 5 0 94 0 340.9kb 340.9kb
green open wazuh-monitoring-3.x-2018.05.30 SCeBk4V5Rm-UhET3D_tQdQ 5 0 148 0 329.7kb 329.7kb
green open .kibana CB2dCSGyQuilIjoPsXbvBQ 5 0 267 1 247.6kb 247.6kb
Could you please confirm is the reindex mandatory just to avoid future issues.
Thanks,
SR
curl -XPUT 'localhost:9200/wazuh-monitoring-*/_settings?pretty' -H 'Content-Type: application/json' -d'
{
"settings" : {
"number_of_replicas" : 0
}
}
'
4. After checking the indices all were greenwazuh-monitoring-3.x-2018.0x.0x indices health getting into yellow state.Even though I have setup replica to 0.
# curl "http://localhost:9200/_template/wazuh?pretty&filter_path=wazuh.settings"
{
"wazuh" : {
"settings" : {
"index" : {
"number_of_shards" : "1",
"number_of_replicas" : "0",
"refresh_interval" : "5s"
}
}
}
}
curl -XPUT 'localhost:9200/wazuh-monitoring-*/_settings?pretty' -H 'Content-Type: application/json' -d'
{
"settings" : {
"number_of_replicas" : 0
}
}
'
Hello SR,
The wazuh-monitoring indices use a different index template from the wazuh-alerts ones. You need to modify that template in order to change the number of shards and replicas.
To do this, you can open the Dev Tools tab on the left sidebar of the Kibana interface. This tool allows you to send requests to Elasticsearch and easily modify some settings.
Put the following content on the left pane of the tab:
PUT _template/wazuh-agent
{
"order": 0,
"template": "wazuh-monitoring-3.x-*",
"settings": {
"index": {
"refresh_interval": "5s",
"number_of_shards": "1",
"number_of_replicas": "0"
}
},
"mappings": {
"wazuh-agent": {
"properties": {
"@timestamp": {
"type": "date",
"format": "dateOptionalTime"
},
"status": {
"type": "keyword"
},
"ip": {
"type": "keyword"
},
"host": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"id": {
"type": "keyword"
},
"cluster": {
"properties": {
"name": {
"type": "keyword"
}
}
}
}
}
}
}
And click on the green Play button on the top of the request block.
You should get a response like this (ignore the deprecation warning):
{"acknowledged": true}
Now, all the newly created wazuh-monitoring-3.x-* indices will have this new shards and replicas settings.
Let me know if this helps.
Regards,
Juanjo
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/b844890c-d445-42e5-b083-247e232db345%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/d0f4c524-9fbb-456c-8fc0-57cbeb076750%40googlegroups.com.