Skip to content

Commit be03876

Browse files
Merge pull request #2 from voltagepark/feature_mib_extensions
feature: MIB extensions
2 parents bd42ccc + b9fbba2 commit be03876

6 files changed

Lines changed: 3409 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
.env*
33
*.env
44

5+
# IDE ignores
6+
.idea
7+
58
# Temporary folders
69
tmp/
710
temp/

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ COPY files/cron-observium /etc/cron.d/observium
1616
COPY files/supervisord.conf /etc/supervisord.conf
1717
COPY files/docker-entrypoint.sh /usr/local/bin/
1818

19+
RUN mkdir /opt/observium-voltagepark
20+
COPY files/includes /opt/observium-voltagepark/includes
21+
COPY files/mibs /opt/observium-voltagepark/mibs
22+
1923
RUN a2dismod mpm_event && \
2024
a2enmod mpm_prefork && \
2125
a2enmod php8.3 && \

files/docker-entrypoint.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ chown www-data:www-data /config/rrd -R
2626
mkdir -p /tmp/observium_cache
2727
chown www-data:www-data /tmp/observium_cache -R
2828

29+
# move voltagepark customizations
30+
if [ ! -d "/opt/observium/includes/definitions/mibs/voltagepark/" ]; then
31+
mkdir /opt/observium/includes/definitions/mibs/voltagepark/
32+
fi
33+
if find /opt/observium-voltagepark/includes/definitions/mibs -mindepth 1 -maxdepth 1 | read; then
34+
mv /opt/observium-voltagepark/includes/definitions/mibs/* /opt/observium/includes/definitions/mibs/voltagepark/
35+
fi
36+
37+
if [ ! -d "/opt/observium/mibs/voltagepark/" ]; then
38+
mkdir /opt/observium/mibs/voltagepark/
39+
fi
40+
if find /opt/observium-voltagepark/mibs -mindepth 1 -maxdepth 1 | read; then
41+
mv /opt/observium-voltagepark/mibs/* /opt/observium/mibs/voltagepark/
42+
fi
43+
44+
2945
if test -v OBSERVIUM_ALLCONFIG; then
3046
echo "<?php" > /opt/observium/config.php
3147
echo $OBSERVIUM_ALLCONFIG | base64 -d >> /opt/observium/config.php
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?php
2+
/**
3+
* Observium
4+
*
5+
* This file was used to extend iDRAC from base observium
6+
*
7+
*/
8+
9+
$mib = 'IDRAC-MIB-SMIv2';
10+
$config['mibs'][$mib]['enable'] = 1;
11+
$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.674.10892.5';
12+
$config['mibs'][$mib]['mib_dir'] = 'dell';
13+
$config['mibs'][$mib]['descr'] = 'Dell iDRAC v7 and newer devices Extended';
14+
15+
// Processor Object Status
16+
$config['mibs'][$mib]['status'][] = [
17+
'table' => 'processorDeviceTable',
18+
'oid' => 'processorDeviceStatus',
19+
'oid_descr' => 'processorDeviceFQDD',
20+
'descr_transform' => [ 'action' => 'replace', 'from' => [ '.' ], 'to' => [ ' ' ] ],
21+
'measured' => 'processor',
22+
'oid_num' => '.1.3.6.1.4.1.674.10892.5.4.1100.30.1.5',
23+
'type' => 'ObjectStatusEnum',
24+
];
25+
26+
// Memory Object Status
27+
$config['mibs'][$mib]['status'][] = [
28+
'table' => 'memoryDeviceTable',
29+
'oid' => 'memoryDeviceStatus',
30+
'oid_descr' => 'memoryDeviceLocationName',
31+
'descr_transform' => [ 'action' => 'replace', 'from' => [ '.' ], 'to' => [ ' ' ] ],
32+
'measured' => 'memory',
33+
'oid_num' => '.1.3.6.1.4.1.674.10892.5.4.1100.50.1.5',
34+
'type' => 'ObjectStatusEnum',
35+
];
36+
37+
// GPU Object Status
38+
$config['mibs'][$mib]['status'][] = [
39+
'table' => 'pCIDeviceTableEntry',
40+
'oid' => 'pCIDeviceStatus',
41+
'oid_descr' => 'pCIDeviceFQDD',
42+
'descr_transform' => [ 'action' => 'replace', 'from' => [ 'Video.Slot.', '-1' ], 'to' => [ 'System Board GPU', '' ] ],
43+
'measured' => 'gpu',
44+
'oid_num' => '.1.3.6.1.4.1.674.10892.5.4.1100.80.1.5',
45+
'type' => 'ObjectStatusEnum',
46+
'test' => [ 'field' => 'pCIDeviceFQDD', 'operator' => 'regex', 'value' => '^Video\.Slot' ],
47+
];
48+
49+
// Network InfiniBand Object Status
50+
$config['mibs'][$mib]['status'][] = [
51+
'table' => 'pCIDeviceTableEntry',
52+
'oid' => 'pCIDeviceStatus',
53+
'oid_descr' => 'pCIDeviceFQDD',
54+
'descr_transform' => [ 'action' => 'replace', 'from' => [ '.', '-1' ], 'to' => [ ' ', '' ] ],
55+
'measured' => 'network',
56+
'oid_num' => '.1.3.6.1.4.1.674.10892.5.4.1100.80.1.5',
57+
'type' => 'ObjectStatusEnum',
58+
'test' => [ 'field' => 'pCIDeviceFQDD', 'operator' => 'regex', 'value' => '^InfiniBand\.Slot\.' ],
59+
];
60+
61+
// Network Object Status
62+
$config['mibs'][$mib]['status'][] = [
63+
'table' => 'networkDeviceTableEntry',
64+
'oid' => 'networkDeviceStatus',
65+
'oid_descr' => 'networkDeviceFQDD',
66+
'descr_transform' => [ 'action' => 'replace', 'from' => [ '.', '-1-1', '-2-1' ], 'to' => [ ' ', '', '' ] ],
67+
'measured' => 'network',
68+
'oid_num' => '.1.3.6.1.4.1.674.10892.5.4.1100.90.1.3',
69+
'type' => 'ObjectStatusEnum',
70+
];
71+
72+
// EOF
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
/**
3+
* Observium
4+
*
5+
* This file extended from the base of Observium.
6+
*
7+
*/
8+
9+
$mib = 'PACKETPOWER-EG4-MIB';
10+
$config['mibs'][$mib]['enable'] = 1;
11+
$config['mibs'][$mib]['mib_dir'] = 'voltagepark';
12+
$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.33688';
13+
$config['mibs'][$mib]['descr'] = 'Packet Power Node MIB';
14+
15+
// EOF

0 commit comments

Comments
 (0)