Skip to content

Commit eee2fa7

Browse files
authored
Merge pull request #296 from redBorder/development
Release 6.14.0
2 parents c1f076d + 1006f9a commit eee2fa7

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.13.1
1+
6.14.0
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
# Create Aerospike indexes if not exists
4+
5+
function create_index() {
6+
local namespace=$1
7+
local set=$2
8+
local bin=$3
9+
local index_name=$4
10+
local index_type=$5
11+
12+
echo "INFO: Creating index $index_name on $namespace.$set($bin)"
13+
echo "enable; manage sindex create $index_type $index_name ns $namespace set $set bin $bin" | asadm
14+
15+
if [ $? -ne 0 ]; then
16+
echo "ERROR: Could not create index $index_name on $namespace.$set($bin), exiting..."
17+
fi
18+
}
19+
20+
# Check if asadm is installed
21+
if ! command -v asadm &> /dev/null; then
22+
echo "ERROR: asadm could not be found, please install Aerospike tools, exiting..."
23+
exit 1
24+
fi
25+
26+
# Create indexes if not exists
27+
create_index "malware" "urlScores" "list_type" "index_url_list" "string"
28+
create_index "malware" "urlScores" "score" "index_url_score" "numeric"
29+
create_index "malware" "hashScores" "list_type" "idx_events_src_ip" "string"
30+
create_index "malware" "hashScores" "score" "index_hash_score" "numeric"
31+
create_index "malware" "ipScores" "list_type" "index_ip_list" "string"
32+
create_index "malware" "ipScores" "score" "index_ip_score" "numeric"
33+
create_index "malware" "controlFiles" "hash" "index_hash_controlFiles" "string"
34+
create_index "malware" "mailQuarantine" "sensor_uuid" "index_mail_quarantine" "string"

0 commit comments

Comments
 (0)