mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
call ipmitool locally when polling the observium host itself, solves some issues with a shared IPMI on the observium host box NIC
git-svn-id: http://www.observium.org/svn/observer/trunk@2685 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -8,7 +8,12 @@ if ($ipmi['host'] = get_dev_attrib($device,'ipmi_hostname'))
|
||||
$ipmi['user'] = get_dev_attrib($device,'ipmi_username');
|
||||
$ipmi['password'] = get_dev_attrib($device,'ipmi_password');
|
||||
|
||||
$results = shell_exec($config['ipmitool'] . " -H " . $ipmi['host'] . " -U " . $ipmi['user'] . " -P " . $ipmi['password'] . " sensor|sort");
|
||||
if ($config['own_hostname'] != $device['hostname'] || $ipmi['host'] != 'localhost')
|
||||
{
|
||||
$remote = " -H " . $ipmi['host'] . " -U " . $ipmi['user'] . " -P " . $ipmi['password'];
|
||||
}
|
||||
|
||||
$results = external_exec($config['ipmitool'] . $remote . " sensor 2>/dev/null|sort");
|
||||
|
||||
$index = 0;
|
||||
|
||||
|
@@ -8,7 +8,13 @@ if ($ipmi['host'] = get_dev_attrib($device,'ipmi_hostname'))
|
||||
$ipmi['password'] = get_dev_attrib($device,'ipmi_password');
|
||||
|
||||
echo("Fetching IPMI sensor data...");
|
||||
$results = shell_exec($config['ipmitool'] . " -c -H " . $ipmi['host'] . " -U " . $ipmi['user'] . " -P " . $ipmi['password'] . " sdr");
|
||||
|
||||
if ($config['own_hostname'] != $device['hostname'] || $ipmi['host'] != 'localhost')
|
||||
{
|
||||
$remote = " -H " . $ipmi['host'] . " -U " . $ipmi['user'] . " -P " . $ipmi['password'];
|
||||
}
|
||||
|
||||
$results = external_exec($config['ipmitool'] . " -c " . $remote . " sdr 2>/dev/null");
|
||||
echo(" done.\n");
|
||||
|
||||
foreach (explode("\n",$results) as $row)
|
||||
|
Reference in New Issue
Block a user