Hi,
Settings: Some error ocurred, could not save data in elasticsearch.
Settings: Error when loading Wazuh setup info
Wazuh App: Please set up Wazuh API credentials.
$ curl -u foo:bar -k http://127.0.0.1:55000?pretty
{
"error": 0,
"data": "Welcome to Wazuh HIDS API"
}$ curl -XGET localhost:9200/_cat/indices$ curl -u foo:bar -k http://127.0.0.1:55000?pretty
{
"error": 0,
"data": "Welcome to Wazuh HIDS API"
}$ curl -XGET localhost:9200/_cat/indicescurl -XGET 'localhost:9200/_cluster/health?pretty'systemctl stop kibana/usr/share/kibana/bin/kibana-plugin remove wazuhrm -rf /usr/share/kibana/optimize/bundles//usr/share/kibana/bin/kibana-plugin install https://packages.wazuh.com/wazuhapp/wazuhapp.zipsystemctl start kibanasystemctl stop kibana/usr/share/kibana/bin/kibana-plugin remove wazuhrm -rf /usr/share/kibana/optimize/bundles//usr/share/kibana/bin/kibana-plugin install https://packages.wazuh.com/wazuhapp/wazuhapp-2.0_5.5.0.zipsystemctl start kibana# curl -s -u u:p -k -X GET https://localhost/?pretty
{
"error": 0,
"data": {
"msg": "Welcome to Wazuh HIDS API",
"api_version": "v3.2.2",
"hostname": "returnpath-ids-00",
"timestamp": "Wed May 23 2018 14:35:32 GMT+0000 (UTC)"
}
}
# curl -XGET localhost:9200/_cat/indices
yellow open wazuh-monitoring-3.x-2018.05.23 UlDZ34N-RHizhvlayc6MCg 5 1 0 0 1.2kb 1.2kb
yellow open .wazuh 1El8LXy5Su-n2Yp7xmhHBw 1 1 0 0 261b 261b
yellow open wazuh-monitoring-3.x-2018.05.22 yi7Xyz7vSTaui6Mcvvk-sQ 5 1 0 0 1.2kb 1.2kb
yellow open .kibana SAETU_m5T6iV1ija50bNhw 5 1 2 0 19.1kb 19.1kb
yellow open .wazuh-version vMmKfhnEQ-KBvh-aCMzG2A 1 1 1 0 5.1kb 5.1kb
yellow open wazuh-alerts-3.x-2018.05.22 iohjyf50S4KuT7gSAb1TTg 5 1 235 0 480.1kb 480.1kb
yellow open wazuh-alerts-3.x-2018.05.23 oMZCxQ51T2Kh1yckM8u7WQ 5 1 100 0 323.6kb 323.6kb
# curl -XGET 'localhost:9200/_cluster/health?pretty'
{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 27,
"active_shards" : 27,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 27,
"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" : 50.0
}
# cat /usr/share/kibana/plugins/wazuh/package.json | grep -i -E "version|revision"# curl elastic_ip:9200/ -s | grep number# cat /usr/share/kibana/plugins/wazuh/package.json | grep -i -E "version|revision"
"version": "3.2.2",
"revision": "0390",
"version": "6.2.4"
# curl localhost:9200/ -s | grep number
"number" : "6.2.4",
# systemctl stop kibana# /usr/share/kibana/bin/kibana-plugin remove wazuh
# rm -rf /usr/share/kibana/optimize/bundles# /usr/share/kibana/bin/kibana-plugin install https://packages.wazuh.com/wazuhapp/wazuhapp-3.2.2_6.2.4.zip# systemctl restart kibana# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
--
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/76d3cd41-d803-41ac-8b61-c3d98919415d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/76d3cd41-d803-41ac-8b61-c3d98919415d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Best regards,
Jesús.
const userRegEx = new RegExp(/^.{3,100}$/);
const passRegEx = new RegExp(/^.{3,100}$/);
const urlRegEx = new RegExp(/^https?:\/\/[a-zA-Z0-9]{1,300}$/);
const urlRegExIP = new RegExp(/^https?:\/\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/);
const portRegEx = new RegExp(/^[0-9]{2,5}$/);
const payload = {
user: 'api',
password: 'something123e###2!',
url: 'https://returnpath-ids-00.c.cloudaware-ids.internal',
port: 443
}
if(!userRegEx.test(payload.user)){
console.log('user')
}
// Validate password
if(!passRegEx.test(payload.password)){
console.log('password')
}
// Validate url
if(!urlRegEx.test(payload.url) && !urlRegExIP.test(payload.url)){
console.log('url')
}
// Validate port
const validatePort = parseInt(payload.port);
if(!portRegEx.test(payload.port) || validatePort <= 0 || validatePort >= 99999) {
console.log('port')
}# systemctl stop kibana validateData (payload) {
// Validate user
if(!userRegEx.test(payload.user)){
return reply({ statusCode: 400, error: 10001, message: 'Invalid user field' }).code(400);
}
// Validate password
if(!passRegEx.test(payload.password)){
return reply({ statusCode: 400, error: 10002, message: 'Invalid password field' }).code(400);
}
// Validate url
if(!urlRegEx.test(payload.url) && !urlRegExIP.test(payload.url)){
return reply({ statusCode: 400, error: 10003, message: 'Invalid url field' }).code(400);
}
// Validate port
const validatePort = parseInt(payload.port);
if(!portRegEx.test(payload.port) || validatePort <= 0 || validatePort >= 99999) {
return reply({ statusCode: 400, error: 10004, message: 'Invalid port field' }).code(400);
}
return false;
} validateData (payload) {
return false;
}# rm -rf /usr/share/kibana/optimize/bundles
# systemctl restart kibana