-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into MON-81801
- Loading branch information
Showing
317 changed files
with
3,463 additions
and
849 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/perl | ||
use strict; | ||
use warnings FATAL => 'all'; | ||
use Try::Tiny; | ||
use Crypt::PK::RSA; | ||
use File::Basename qw( fileparse ); | ||
|
||
# generate key if there is none. | ||
# Gorgone can generate it's own key, but as we need the thumbprint in the configuration we need to generate them before launching gorgone. | ||
# this script only create key if the files don't exists, and silently finish if the files already exists. | ||
|
||
my ($privkey, $pubkey); | ||
|
||
my $priv_dest = '/var/lib/centreon-gorgone/.keys/rsakey.priv.pem'; | ||
my $pub_dest = '/var/lib/centreon-gorgone/.keys/rsakey.pub.pem'; | ||
$ARGV[0] and $priv_dest = $ARGV[0]; | ||
$ARGV[1] and $pub_dest = $ARGV[1]; | ||
if (-f $priv_dest or -f $pub_dest){ | ||
print("files already exist, no overriding is done.\n"); | ||
exit 0; | ||
} | ||
try { | ||
my $pkrsa = Crypt::PK::RSA->new(); | ||
$pkrsa->generate_key(256, 65537); | ||
$pubkey = $pkrsa->export_key_pem('public_x509'); | ||
$privkey = $pkrsa->export_key_pem('private'); | ||
} catch { | ||
die("Cannot generate server keys: $_\n"); | ||
}; | ||
|
||
my ( $priv_key_name, $priv_folder_name ) = fileparse $priv_dest; | ||
`mkdir -p $priv_folder_name`; | ||
open(my $priv_fh, '>', $priv_dest) or die("failed opening $priv_dest : $!"); | ||
print $priv_fh $privkey; | ||
print "private key saved to file.\n"; | ||
|
||
my ( $pub_key_name, $pub_folder_name ) = fileparse $pub_dest; | ||
`mkdir -p $pub_folder_name`; | ||
open(my $pub_fh, '>', $pub_dest) or die("failed opening $pub_dest : $!"); | ||
print $pub_fh $pubkey; | ||
print "pub key saved to file.\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: config.yaml | ||
description: Configuration of centreon-gorgone. Use config.d directory to change configuration | ||
configuration: !include /etc/centreon-gorgone/@UNIQ_ID_FROM_ROBOT_TESTING_CONFIG_FILE@/config.d/*.yaml |
43 changes: 43 additions & 0 deletions
43
centreon-gorgone/tests/robot/config/push_central_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
gorgone: | ||
gorgonecore: | ||
internal_com_type: ipc | ||
internal_com_path: /etc/centreon-gorgone/@UNIQ_ID_FROM_ROBOT_TESTING_CONFIG_FILE@/routing.ipc | ||
external_com_type: tcp | ||
|
||
gorgone_db_type: SQLite | ||
gorgone_db_name: dbname=/etc/centreon-gorgone/@UNIQ_ID_FROM_ROBOT_TESTING_CONFIG_FILE@/history.sdb | ||
id: 1 | ||
privkey: "/var/lib/centreon-gorgone/.keys/rsakey.priv.pem" | ||
pubkey: "/var/lib/centreon-gorgone/.keys/rsakey.pub.pem" | ||
modules: | ||
- name: proxy | ||
package: "gorgone::modules::core::proxy::hooks" | ||
enable: true | ||
|
||
- name: nodes | ||
package: "gorgone::modules::centreon::nodes::hooks" | ||
enable: true | ||
|
||
- name: httpserver | ||
package: "gorgone::modules::core::httpserver::hooks" | ||
enable: true | ||
address: "0.0.0.0" | ||
port: "8085" | ||
ssl: false | ||
auth: | ||
enabled: false | ||
allowed_hosts: | ||
enabled: true | ||
subnets: | ||
- 127.0.0.1/32 | ||
|
||
centreon: | ||
database: | ||
db_configuration: | ||
dsn: "mysql:host=@DBHOST@:port=3306;dbname=@DBNAME@" | ||
username: "@DBUSER@" | ||
password: "@DBPASSWORD@" | ||
db_realtime: | ||
dsn: "mysql:host=@DBHOST@:port=3306;dbname=centreon_storage" | ||
username: "@DBUSER@" | ||
password: "@DBPASSWORD@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
INSERT IGNORE INTO `nagios_server` | ||
VALUES | ||
( | ||
1, 'Central', '1', 1, 1711560733, '127.0.0.1', | ||
'1', '0', 'service centengine start', | ||
'service centengine stop', 'service centengine restart', | ||
'service centengine reload', '/usr/sbin/centengine', | ||
'/usr/sbin/centenginestats', '/var/log/centreon-engine/service-perfdata', | ||
'service cbd reload', '/etc/centreon-broker', | ||
'/usr/share/centreon/lib/centreon-broker', | ||
'/usr/lib64/centreon-connector', | ||
22, '1', 5556, 'centreontrapd', '/etc/snmp/centreon_traps/', | ||
NULL, NULL, NULL, NULL, '1', '0' | ||
), | ||
( | ||
2, 'pushpoller', '0', 0, NULL, '127.0.0.1', | ||
'1', '0', 'service centengine start', | ||
'service centengine stop', 'service centengine restart', | ||
'service centengine reload', '/usr/sbin/centengine', | ||
'/usr/sbin/centenginestats', '/var/log/centreon-engine/service-perfdata', | ||
'service cbd reload', '/etc/centreon-broker', | ||
'/usr/share/centreon/lib/centreon-broker', | ||
'/usr/lib64/centreon-connector', | ||
22, '1', 5556, 'centreontrapd', '/etc/snmp/centreon_traps/', | ||
NULL, NULL, '/var/log/centreon-broker/', | ||
NULL, '1', '0' | ||
); | ||
INSERT IGNORE INTO `cfg_nagios` | ||
VALUES | ||
( | ||
1, 'Centreon Engine Central', NULL, | ||
'/var/log/centreon-engine/centengine.log', | ||
'/etc/centreon-engine', '/var/log/centreon-engine/status.dat', | ||
60, '1', '1', '1', '1', '1', '1', '1', | ||
4096, '1s', '/var/lib/centreon-engine/rw/centengine.cmd', | ||
'1', '/var/log/centreon-engine/retention.dat', | ||
60, '1', '1', '0', '1', '1', '1', '1', | ||
NULL, '1', '1', NULL, NULL, NULL, 's', | ||
's', 's', 0, 15, 15, 5, '0', NULL, NULL, | ||
'0', '25.0', '50.0', '25.0', '50.0', | ||
'0', 60, 12, 30, 30, '1', '1', '0', NULL, | ||
NULL, '0', NULL, 'euro', 30, '~!$%^&*\"|\'<>?,()=', | ||
'`~$^&\"|\'<>', '0', '0', 'admin@localhost', | ||
'admin@localhost', 'Centreon Engine configuration file for a central instance', | ||
'1', '-1', 1, '1', '1', 15, 15, NULL, | ||
'0', 15, '/var/log/centreon-engine/centengine.debug', | ||
0, '0', '1', 1000000000, 'centengine.cfg', | ||
'1', '0', '', 'log_v2_enabled' | ||
), | ||
( | ||
15, 'pushpoller', NULL, '/var/log/centreon-engine/centengine.log', | ||
'/etc/centreon-engine/', '/var/log/centreon-engine/status.dat', | ||
60, '1', '1', '1', '1', '1', '1', '1', | ||
4096, '1s', '/var/lib/centreon-engine/rw/centengine.cmd', | ||
'1', '/var/log/centreon-engine/retention.dat', | ||
60, '1', '0', '0', '1', '1', '1', '1', | ||
'1', '1', '1', NULL, NULL, '0.5', 's', | ||
's', 's', 0, 15, 15, 5, '0', 30, 180, '0', | ||
'25.0', '50.0', '25.0', '50.0', '0', | ||
60, 30, 30, 30, '1', '1', '0', NULL, NULL, | ||
'0', NULL, 'euro', 30, '~!$%^&*\"|\'<>?,()=', | ||
'`~$^&\"|\'<>', '0', '0', 'admin@localhost', | ||
'admin@localhost', 'Centreon Engine config file for a polling instance', | ||
'1', '-1', 2, '1', '1', 15, 15, NULL, | ||
'0', 15, '/var/log/centreon-engine/centengine.debug', | ||
0, '0', '1', 1000000000, 'centengine.cfg', | ||
'1', '0', '', 'log_v2_enabled' | ||
); |
2 changes: 2 additions & 0 deletions
2
centreon-gorgone/tests/robot/config/push_db_1_poller_delete.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
delete from cfg_nagios; | ||
delete from nagios_server; |
21 changes: 21 additions & 0 deletions
21
centreon-gorgone/tests/robot/config/push_poller_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: gorgoned-pushpoller | ||
description: Configuration for poller pushpoller | ||
gorgone: | ||
gorgonecore: | ||
internal_com_type: ipc | ||
internal_com_path: /etc/centreon-gorgone/@UNIQ_ID_FROM_ROBOT_TESTING_CONFIG_FILE@/routing.ipc | ||
gorgone_db_type: SQLite | ||
gorgone_db_name: dbname=/etc/centreon-gorgone/@UNIQ_ID_FROM_ROBOT_TESTING_CONFIG_FILE@/history.sdb | ||
id: 2 | ||
external_com_type: tcp | ||
external_com_path: "*:5556" | ||
authorized_clients: | ||
- key:@KEYTHUMBPRINT@ | ||
|
||
privkey: "/var/lib/centreon-gorgone/.keys/rsakey.priv.pem" | ||
pubkey: "/var/lib/centreon-gorgone/.keys/rsakey.pub.pem" | ||
|
||
modules: | ||
- name: action | ||
package: gorgone::modules::core::action::hooks | ||
enable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ Library Examples | |
Library OperatingSystem | ||
Library String | ||
Resource resources.resource | ||
Library DatabaseLibrary |
Oops, something went wrong.