Skip to content

Commit

Permalink
update (#3)
Browse files Browse the repository at this point in the history
* add mitel 3300 icp plugin (centreon#1146)

* add mitel 3300 icp plugin

* move to network tree

* add aeg acm devices plugins (centreon#1147)

* add ruckus smartcell gateway plugin (centreon#1141)

* dns: add CNAME to possible search types (centreon#1143)

* azure plugin fixes, paths break change (centreon#1154)

* add proxyurl option, update cli installation process

* fix label and perfdata names

* fix label and perfdata names

* change paths to providers/services

* fix vm list resources mode path

* add --add-volume option (centreon#1157)

* add time mode to FreeBSD plugin (centreon#1152)

* prepare new release (centreon#1158)

* fix azure plugin typos, helpers and other (centreon#1159)

* fix several typos

* fix several typos, helpers, and other

* enhance template counter (centreon#1167)

* enh template counter, adapt modes not using the template

* rollback problems for type 2

* add prometheus plugin with node_exporter (centreon#1168)

* add prometheus plugin with node_exporter

* add prometheus plugin with node_exporter

* enh filtering (centreon#1169)

* enh template counter message multiple (centreon#1178)

* enh prometheus nodeexporter metrics (centreon#1179)

* enh prometheus nodeexporter metrics handling

* add message multiple

* simplify label_replace, typos

* fix bug with comma on french Windows OS (centreon#1175)

* add prometheus kubernetes plugin (centreon#1181)

* add masterclock ntp plugin (centreon#1182)

* add moxa switch plugin (centreon#1183)

* update slack alert mode (centreon#1177)

The notification not print host and service name

* prepare new release (centreon#1186)

* fix hyperv2012 local nodesnapshot negative timestamp (centreon#1192)

* change masterclock plugin path (centreon#1191)

* fix prometheus api (centreon#1190)

* fix prometheus api custom mode

* enh prometheus timeframe/step options

* enh azure custom mode (centreon#1189)

* fix netapp snmp qtreeusage mode thresholds (centreon#1195)

* this is a check for physical disks not power units (centreon#1194)

* enh kubernetes containerstatus mode (centreon#1197)

* add prometheus cadvisor plugin (centreon#1199)

* add prometheus cadvisor plugin

* change filtering

* enh kubernetes filtering (centreon#1200)

* enh nodeexporter filtering (centreon#1201)

* enh prometheus target status mode filtering (centreon#1206)

* add prometheus expression mode (centreon#1205)

* fix prometheus targetstatus (centreon#1207)

* add axis video camera plugin (centreon#1196)

* good

* K

* Add last functions audio, video, storage

* OK!

* Version final

* Version final2

* Correction OID AudioStatus

* Correction after review

* Correctio path storage.pm

* prepare new release (centreon#1208)

* add Jenkinsfile for continuous integration.

* set default global version to (dev)

* indicate that packaging is not CentOS7-only in Jenkinsfile

* add mrv optiswitch plugin (centreon#1215)

* Enh purestorage restapi plugin (centreon#1221)

* add list-pgroups mode

* add pgroup-replication mode

* fix pgroup name

* fix missing semicolon

* enh windows pending reboot output (centreon#1222)

* add cloud ibm softlayer plugin, gettickets mode (centreon#1224)

* enh cloud ibm softlayer plugin, add events mode (centreon#1226)

* enh cisco standard stack mode (centreon#1227)

* enh cisco standard plugin stack mode

* add missing helper

* add no instances found test

* Fix cisco standard stack mode (centreon#1228)

* fix cisco standard stack mode

* fix typo

* fix cisco standard stack mode typos

* fix cisco callmanager phone name oid (centreon#1230)

* fix cisco callmanager phone name oid, add description (centreon#1231)

* fix fortinet fortigate signatures helper

* enh snmp_standard diskusage mode (centreon#1233)

* enh snmp_standard diskusage mode

* fix helper

* add option in helper

* enh fortinet fortigate cluster status (centreon#1238)

* enh fortinet fortigate cluster status

* add old option for compatibility

* fix huawei ibmc typo

* enh prometheus cadvisor memory (centreon#1240)

* enh hp storeonce cluster usage (centreon#1237)

* add cisco standard plugin configuration mode (centreon#1236)

* enh ibm softlayer plugin (centreon#1241)

* enh ibm softlayer plugin

* enh ibm softlayer plugin, typos

* enh oracle tablespace mode no result found (centreon#1243)

* add pvx plugin (centreon#1246)

* enh azure plugin adding new custom mode (centreon#1248)

* enh aws plugin awscli custom mode (centreon#1249)

* enh aws plugin awscli custom mode

* enh aws plugin awscli custom mode, typo

* add dummy mode (centreon#1258)

* add SonarQube analysis to the Jenkinsfile (centreon#1264)

* OVH SMS Notification (centreon#1263)

* Minor Correction for getting 'get_params' by $request_options during GET Method Access.

* First Release of OVH SMS Notification

Use of HTTP CGI function
(https://docs.ovh.com/fr/sms/envoyer_des_sms_depuis_une_url_-_http2sms/)

* Minor Esthetical Code modification

* changes after code review

* Change of smsId in Response

* fix rights, remove data::dumper

* Telegram Notification (centreon#1266)

* First Release of Telegram Notification Plugin

* Minor esthetical code modification

* Code Beautify

* changes after code review

* add proxmox ve plugin (centreon#1269)

* First Release of Proxmox VE Plugins

Discovery for Nodes, VMs (LXC & QEMU) and Storage
Node Usage, VM Usage and Storage Usage.

* Add Doc Specification about Realm and Privileges

* Added API Ticket Cache Management

* changes after code review

* fix proxmox ve (centreon#1270)

* Mikrotik Implementation (centreon#1077)

* Added Mikrotik support, including cpu and memory. Others still in dev

* Added signal to noise, ssid, temps, voltages, frequencies and signal stength for mikrotik devices

* Small fi

* Signal Fix

* QA testing

* Added messages to frequenct and ssid

* Fixed values for signals

* Forgot semi-colon

* Added CPU specific temps to mikrotik temperatures

* Added warnings and criticals for mikrotik

* Delete .gitignore

Must be removed for pull request

* undoing change for different pull request

* Restructured mikrotik for pull request

* Removed head elements for memory swap mikrotik

* Added mode type to signals

* Changing temperatures for hardware and adding fan component

* Changing voltage for hardware and adding fan component

* Added fan component to hardware mode and fixed heads for parameters

* fix mikrotik pluin

* fix riverved steelhead load-average (centreon#1272)

* fix cloud ibm softlayer api (centreon#1273)

* add azure api options to azcli custommode (centreon#1276)

* fix ibm cloud open tickets regexp

* add quantum dxi plugin (centreon#1280)

* enh quantum dxi plugin

* Fix mssql version bug

* + Fix mssql version bug

* fix quantum dxi

* + Fix bug win real swap snmp

* + Fix bug apc ats (centreon#1127)

* + add comment in help

* add office 365 plugin

* enh office 365 management plugin

* add office365 sharepoint plugin

* enh office365 graphapi custom mode

* enh office365 sharepoint plugin

* enh office365 graphapi custom mode

* add office365 onedrive plugin

* enh office365 onedrive plugin

* fix snmp lib start/end checkup function (centreon#1292)

* enh fortinet fortigate plugin, add vdom modes (centreon#1293)

* enh office365 sharepoint plugin

* enh office365 onedrive plugin

* add office365 exchange plugin
  • Loading branch information
arnaud-michel committed Dec 27, 2018
1 parent d0b3522 commit e84bd98
Show file tree
Hide file tree
Showing 39 changed files with 6,454 additions and 13 deletions.
132 changes: 132 additions & 0 deletions centreon/common/fortinet/fortigate/mode/vdomcpu.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
#
# Copyright 2018 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

package centreon::common::fortinet::fortigate::mode::vdomcpu;

use base qw(centreon::plugins::templates::counter);

use strict;
use warnings;

sub prefix_vdom_output {
my ($self, %options) = @_;

return "Virtual domain '" . $options{instance_value}->{fgVdEntName} . "' ";
}

sub set_counters {
my ($self, %options) = @_;

$self->{maps_counters_type} = [
{ name => 'vdoms', type => 1, cb_prefix_output => 'prefix_vdom_output', message_multiple => 'All cpu usage are ok' },
];
$self->{maps_counters}->{vdoms} = [
{ label => 'usage', set => {
key_values => [ { name => 'fgVdEntCpuUsage' }, { name => 'fgVdEntName' } ],
output_template => 'CPU usage: %.2f%%',
perfdatas => [
{ label => 'cpu_usage', value => 'fgVdEntCpuUsage_absolute', template => '%.2f',
min => 0, min => 100, unit => '%', label_extra_instance => 1, instance_use => 'fgVdEntName_absolute' },
],
}
},
];
}

sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;

$self->{version} = '1.0';
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
return $self;
}

sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
}

my $mapping = {
fgVdEntName => { oid => '.1.3.6.1.4.1.12356.101.3.2.1.1.2' },
fgVdEntCpuUsage => { oid => '.1.3.6.1.4.1.12356.101.3.2.1.1.5' },
};

my $oid_fgVdInfo = '.1.3.6.1.4.1.12356.101.3.2';

sub manage_selection {
my ($self, %options) = @_;

$self->{vdoms} = {};

my $results = $options{snmp}->get_table(oid => $oid_fgVdInfo , nothing_quit => 1);

foreach my $oid (keys %{$results}) {
next if ($oid !~ /^$mapping->{fgVdEntCpuUsage}->{oid}\.(\d+)/);
my $instance = $1;
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $results, instance => $instance);

if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
$result->{fgVdEntName} !~ /$self->{option_results}->{filter_name}/) {
$self->{output}->output_add(long_msg => "skipping '" . $name . "': no matching filter name.", debug => 1);
next;
}

$self->{vdoms}->{$result->{fgVdEntName}} = {
fgVdEntName => $result->{fgVdEntName},
fgVdEntCpuUsage => $result->{fgVdEntCpuUsage},
}
}

if (scalar(keys %{$self->{vdoms}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "No entry found.");
$self->{output}->option_exit();
}
}

1;

__END__
=head1 MODE
Check virtual domains CPU usage.
=over 8
=item B<--filter-name>
Filter by virtual domain name (can be a regexp).
=item B<--warning-usage>
Threshold warning.
=item B<--critical-usage>
Threshold critical.
=back
=cut
132 changes: 132 additions & 0 deletions centreon/common/fortinet/fortigate/mode/vdommemory.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
#
# Copyright 2018 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

package centreon::common::fortinet::fortigate::mode::vdommemory;

use base qw(centreon::plugins::templates::counter);

use strict;
use warnings;

sub prefix_vdom_output {
my ($self, %options) = @_;

return "Virtual domain '" . $options{instance_value}->{fgVdEntName} . "' ";
}

sub set_counters {
my ($self, %options) = @_;

$self->{maps_counters_type} = [
{ name => 'vdoms', type => 1, cb_prefix_output => 'prefix_vdom_output', message_multiple => 'All memory usage are ok' },
];
$self->{maps_counters}->{vdoms} = [
{ label => 'usage', set => {
key_values => [ { name => 'fgVdEntMemUsage' }, { name => 'fgVdEntName' } ],
output_template => 'memory usage: %.2f%%',
perfdatas => [
{ label => 'memory_usage', value => 'fgVdEntMemUsage_absolute', template => '%.2f',
min => 0, min => 100, unit => '%', label_extra_instance => 1, instance_use => 'fgVdEntName_absolute' },
],
}
},
];
}

sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;

$self->{version} = '1.0';
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
return $self;
}

sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
}

my $mapping = {
fgVdEntName => { oid => '.1.3.6.1.4.1.12356.101.3.2.1.1.2' },
fgVdEntMemUsage => { oid => '.1.3.6.1.4.1.12356.101.3.2.1.1.6' },
};

my $oid_fgVdInfo = '.1.3.6.1.4.1.12356.101.3.2';

sub manage_selection {
my ($self, %options) = @_;

$self->{vdoms} = {};

my $results = $options{snmp}->get_table(oid => $oid_fgVdInfo , nothing_quit => 1);

foreach my $oid (keys %{$results}) {
next if ($oid !~ /^$mapping->{fgVdEntMemUsage}->{oid}\.(\d+)/);
my $instance = $1;
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $results, instance => $instance);

if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
$result->{fgVdEntName} !~ /$self->{option_results}->{filter_name}/) {
$self->{output}->output_add(long_msg => "skipping '" . $name . "': no matching filter name.", debug => 1);
next;
}

$self->{vdoms}->{$result->{fgVdEntName}} = {
fgVdEntName => $result->{fgVdEntName},
fgVdEntMemUsage => $result->{fgVdEntMemUsage},
}
}

if (scalar(keys %{$self->{vdoms}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "No entry found.");
$self->{output}->option_exit();
}
}

1;

__END__
=head1 MODE
Check virtual domains memory usage.
=over 8
=item B<--filter-name>
Filter by virtual domain name (can be a regexp).
=item B<--warning-usage>
Threshold warning.
=item B<--critical-usage>
Threshold critical.
=back
=cut

0 comments on commit e84bd98

Please sign in to comment.