Commit Graph

19 Commits

Author SHA1 Message Date
matoy 4cd16708e7
Update requests.pm (#3044)
azure-cdn-fix

{"code":"BadRequest","message":"Failed to find metric configuration for provider: Microsoft.Cdn, resource Type: profiles, metric: percentage4xx, Valid metrics: RequestCount,ResponseSize,TotalLatency,ByteHitRatio"}

{"code":"BadRequest","message":"Failed to find metric configuration for provider: Microsoft.Cdn, resource Type: profiles, metric: percentage5xx, Valid metrics: RequestCount,ResponseSize,TotalLatency,ByteHitRatio"}
2021-09-06 10:15:58 +02:00
itoussies 7d8a6c789f
fix(plugin): Azure CDN (#2898) 2021-06-21 09:45:58 +02:00
itoussies 17d5a5a6eb
Update and rename request.pm to requests.pm 2021-06-10 19:34:35 +02:00
matoy ac7fa3bbf0
Update cloud/azure/network/cdn/mode/response.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:14:39 +02:00
matoy b6888c8525
Update cloud/azure/network/cdn/plugin.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:14:23 +02:00
matoy 19b8c7e08f
Update cloud/azure/network/cdn/mode/response.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:14:09 +02:00
matoy 7e5b03cf26
Update cloud/azure/network/cdn/mode/request.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:13:53 +02:00
matoy c7d32d0250
Update cloud/azure/network/cdn/mode/request.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:13:36 +02:00
matoy 8512a3f78f
Update cloud/azure/network/cdn/mode/request.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:13:24 +02:00
matoy 2cd4f505d0
Update cloud/azure/network/cdn/mode/request.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:13:12 +02:00
matoy 7b6b73d799
Update cloud/azure/network/cdn/mode/request.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:12:59 +02:00
matoy 033b4f648c
Update cloud/azure/network/cdn/mode/request.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:12:46 +02:00
matoy c7115716f1
Update cloud/azure/network/cdn/mode/request.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:12:35 +02:00
matoy 9b1480fd18
Update cloud/azure/network/cdn/mode/latency.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:12:25 +02:00
matoy a1e8f3b33d
Update cloud/azure/network/cdn/mode/latency.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:12:15 +02:00
matoy e7cb7b6c7a
Update cloud/azure/network/cdn/mode/hitratio.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:12:07 +02:00
matoy 5c1b15a37b
Update cloud/azure/network/cdn/mode/hitratio.pm
Co-authored-by: itoussies <65223458+itoussies@users.noreply.github.com>
2021-06-09 18:10:55 +02:00
matoy 27ce2843dd
Update plugin.pm 2021-05-19 11:27:05 +02:00
matoy 55e796633a
new plugin for Azure CDN with 4 modes + discovery
[xxxcdn]# /usr/lib/centreon/plugins//centreon-plugins/centreon_plugins.pl --plugin=cloud::azure::network::cdn::plugin --custommode='api' --list-mode

Plugin Description:
Check Microsoft Azure CDP profile service.

Global Options:
--mode Choose a mode.

--dyn-mode
        Specify a mode with the path (separated by '::').

--list-mode
        List available modes.

--mode-version
        Check minimal version of mode. If not, unknown error.

--version
        Display plugin version.

--custommode
        Choose a custom mode.

--list-custommode
        List available custom modes.

--multiple
        Multiple custom mode objects (required by some specific modes)

--pass-manager
        Use a password manager.
Modes Meta:
multi

Modes Available:
discovery
hit-ratio
latency
request
response

[xxxcdn]# /usr/lib/centreon/plugins//centreon-plugins/centreon_plugins.pl --plugin=cloud::azure::network::cdn::plugin --custommode='api' --mode='discovery' --subscription='xxx' --tenant='xxx' --client-id='xxx' --client-secret='' --resource-group='xxx'
{"end_time":1621344000,"start_time":1621344000,"duration":0,"discovered_items":1,"results":[{"location":"global","sku":[{"value":"Standard_Microsoft","key":"name"}],"name":"xxx","resourceGroup":"xxx","type":"microsoft.cdn/profiles","id":"/subscriptions/xxx/resourceGroups/xxx/providers/microsoft.cdn/profiles/xxx","tags":[]}]}
[xxxcdn]# /usr/lib/centreon/plugins//centreon-plugins/centreon_plugins.pl --plugin=cloud::azure::network::cdn::plugin --custommode='api' --mode='hit-ratio' --subscription='xxx' --tenant='xxx' --client-id='xxx' --client-secret='' --resource-group='xxx' --resource='xxx'
OK: Instance 'xxx' Statistic 'average' Metrics Byte Hit Ratio: 95.27% | 'xxx~average#cdn.byte.hit.percentage'=95.27%;;;0;100

[xxxcdn]# /usr/lib/centreon/plugins//centreon-plugins/centreon_plugins.pl --plugin=cloud::azure::network::cdn::plugin --custommode='api' --mode='latency' --subscription='xxx' --tenant='xxx' --client-id='xxx' --client-secret='***' --resource-group='xxx' --resource='xxx'
OK: Instance 'xxx' Statistic 'average' Metrics Total Latency: 1428.45ms | 'xxx~average#cdn.latency.total.milliseconds'=1428.45ms;;;0;

[xxxcdn]# /usr/lib/centreon/plugins//centreon-plugins/centreon_plugins.pl --plugin=cloud::azure::network::cdn::plugin --custommode='api' --mode='request' --subscription='xxx' --tenant='xxx' --client-id='xxx' --client-secret='***' --resource-group='xxx' --resource='xxx'
OK: Instance 'xxx' Statistic 'count' Metrics Request count: 118.00 | 'xxx~count#cdn.request.count'=118.00;;;0;

[xxxcdn]# /usr/lib/centreon/plugins//centreon-plugins/centreon_plugins.pl --plugin=cloud::azure::network::cdn::plugin --custommode='api' --mode='response' --subscription='xxx' --tenant='xxx' --client-id='xxx' --client-secret='***' --resource-group='xxx' --resource='xxx'
OK: Instance 'xxx' Statistic 'average' Metrics Response Size: 1092832.38Bytes | 'xxx~average#cdn.response.size'=1092832.38Bytes;;;0;
2021-05-18 19:25:39 +02:00