Skip to content

Commit 0cad50d

Browse files
authored
Merge pull request #29 from statusengine/3.7
Statusengine Version 3.7
2 parents 27d02a8 + 2466c35 commit 0cad50d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4807
-365
lines changed

bin/Console.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use Statusengine\Console\Statistics;
2525
use Statusengine\Console\Cleanup;
2626
use Statusengine\Console\Cluster;
27+
use Statusengine\Console\Database;
2728

2829
$Config = new \Statusengine\Config();
2930
if($Config->getDisableHttpProxy()){
@@ -36,6 +37,7 @@
3637
$application->add(new Statistics());
3738
$application->add(new Cleanup());
3839
$application->add(new Cluster());
40+
$application->add(new Database());
3941
$application->run();
4042

4143

bin/StatusengineWorker.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@
102102

103103
$QueryHandler = new \Statusengine\QueryHandler($Config, $Syslog);
104104
$ExternalCommandFile = new \Statusengine\ExternalCommandFile($Config, $Syslog);
105-
$TaskManager = new \Statusengine\TaskManager($Config, $StorageBackend, $QueryHandler, $ExternalCommandFile, $Syslog);
105+
$QueueingEngine = new \Statusengine\QueueingEngines\QueueingEngine($Config, new \Statusengine\Config\Externalcommand(), $Syslog);
106+
$TaskManager = new \Statusengine\TaskManager($Config, $StorageBackend, $QueryHandler, $ExternalCommandFile, $Syslog, $QueueingEngine);
106107
$MonitoringRestartConfig = new Statusengine\Config\MonitoringRestart();
107108
$ParentProcess = new \Statusengine\ParentProcess(
108109
$StatisticCollector,

composer.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@
2323
"ext-bcmath": "*",
2424
"ext-json": "*",
2525
"ext-iconv": "*",
26-
"symfony/yaml": "2.8",
27-
"symfony/console": "2.8",
28-
"crate/crate-dbal":"*",
29-
"crate/crate-pdo":"~0.6.0",
30-
"php-amqplib/php-amqplib": "^2.7"
26+
"ext-pdo": "*",
27+
"symfony/yaml": "^3.4",
28+
"symfony/console": "^3.4",
29+
"php-amqplib/php-amqplib": "^2.7",
30+
"crate/crate-dbal": "^2.0",
31+
"crate/crate-pdo": "^1.0",
32+
"doctrine/dbal": "^2.9",
33+
"doctrine/migrations": "^2.1"
3134
},
3235

3336
"autoload": {

docs/Env.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Even if its possible, I don't recommend to use a mix of both.
2727
| SE_MYSQL_USER | string | depends | Required if `SE_USE_MYSQL` is enabled |
2828
| SE_MYSQL_PASSWORD | string | depends | Required if `SE_USE_MYSQL` is enabled |
2929
| SE_MYSQL_DATABASE | string | depends | Required if `SE_USE_MYSQL` is enabled |
30+
| SE_MYSQL_ENCODING | string | depends | Required if `SE_USE_MYSQL` is enabled, Example: utf8 or utf8mb4 |
3031
| SE_CRATE_NODES | array | depends | `export SE_CRATE_NODES="127.0.0.1:4200,192.168.1.1:4200,192.168.10.1:4200"` |
3132
| SE_GEARMAN_ADDRESS | string | depends | Required if `SE_USE_GEARMAN` is enabled |
3233
| SE_GEARMAN_PORT | string | no | |
@@ -60,7 +61,6 @@ Even if its possible, I don't recommend to use a mix of both.
6061
| SE_ELASTICSEARCH_TEMPLATE_NUMBER_OF_REPLICAS | int | no | |
6162
| SE_ELASTICSEARCH_TEMPLATE_REFRESH_INTERVAL | string | no | |
6263
| SE_ELASTICSEARCH_TEMPLATE_CODEC | string | no | |
63-
| SE_ELASTICSEARCH_TEMPLATE_ENABLE_ALL | bool | no | |
6464
| SE_ELASTICSEARCH_TEMPLATE_ENABLE_SOURCE | bool | no | |
6565
| SE_ELASTICSEARCH_ADDRESS | string | depends | If `elasticsearch` is in `SE_PERFDATA_BACKEND` |
6666
| SE_ELASTICSEARCH_PORT | int | depends | If `elasticsearch` is in `SE_PERFDATA_BACKEND` |

etc/config.yml.example

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ mysql:
8383
username: statusengine
8484
password: password
8585
database: statusengine
86+
encoding: utf8
8687

8788
# If Statusengine should save historical data to CrateDB
8889
# WARNING: Do not set use_crate and use_mysql to 1 at the same time!
@@ -197,7 +198,6 @@ elasticsearch_template:
197198
number_of_replicas: 0
198199
refresh_interval: 15s
199200
codec: best_compression
200-
enable_all: 0
201201
enable_source: 1
202202

203203
# Index that will be used to store data in Elasticsearch
@@ -245,12 +245,17 @@ query_handler: /opt/naemon/var/naemon.qh
245245

246246
# Pass external commands to the external commands file.
247247
# Naemon and Nagios
248-
submit_method: cmd
248+
#submit_method: cmd
249249

250250
# Pass external commands to the query handler
251251
# Naemon only at the moment, but i but i recommend to use this, with Naemon
252252
#submit_method: qh
253253

254+
# Pass external commands through the Statusengine Broker using the statusngin_cmd queue
255+
# Requires to use the C++ Statusengine Broker: https://github.com/statusengine/broker
256+
# Supports Naemon and Nagios
257+
submit_method: broker
258+
254259
############
255260
# SYSLOG CONFIGURATION
256261
############

lib/Elasticsearch/template.json

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,37 @@
11
{
2-
"template": "statusengine-metric-*",
3-
"order": 0,
4-
"settings": {
5-
"index": {
6-
"number_of_shards": 1,
7-
"refresh_interval": "60s",
8-
"codec": "best_compression",
9-
"mapper.dynamic": false
10-
}
11-
},
12-
"mappings": {
13-
"_default_": {
14-
"_all": {
15-
"enabled": "false"
16-
},
17-
"_source": {
18-
"enabled": "true"
19-
}
2+
"template": "statusengine-metric-*",
3+
"order": 0,
4+
"settings": {
5+
"index": {
6+
"number_of_shards": 1,
7+
"refresh_interval": "60s",
8+
"codec": "best_compression"
9+
}
2010
},
21-
"metric": {
22-
"properties": {
23-
"@timestamp": {
24-
"type": "date"
25-
},
26-
"value": {
27-
"type": "double",
28-
"index": "no"
29-
},
30-
"hostname": {
31-
"type": "string",
32-
"index": "not_analyzed"
33-
},
34-
"service_description": {
35-
"type": "string",
36-
"index": "not_analyzed"
11+
"mappings": {
12+
"_source": {
13+
"enabled": "true"
3714
},
38-
"metric": {
39-
"type": "string",
40-
"index": "not_analyzed"
15+
"properties": {
16+
"@timestamp": {
17+
"type": "date"
18+
},
19+
"value": {
20+
"type": "double",
21+
"index": "false"
22+
},
23+
"hostname": {
24+
"type": "string",
25+
"index": "not_analyzed"
26+
},
27+
"service_description": {
28+
"type": "string",
29+
"index": "not_analyzed"
30+
},
31+
"metric": {
32+
"type": "string",
33+
"index": "not_analyzed"
34+
}
4135
}
42-
}
4336
}
44-
}
4537
}

0 commit comments

Comments
 (0)