mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 08:02:23 +02:00
add more files
git-svn-id: http://www.observium.org/svn/observer/trunk@411 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+3
-2
@@ -15,9 +15,10 @@ if($argv[1] && $argv[2] && $argv[3]) {
|
||||
|
||||
list($hostshort) = explode(".", $host);
|
||||
if ( isDomainResolves($argv[1])){
|
||||
if ( isPingable($argv[1])) {
|
||||
if ( isPingable($argv[1])) {
|
||||
if ( mysql_result(mysql_query("SELECT COUNT(*) FROM `devices` WHERE `hostname` = '".mres($host)."'"), 0) == '0' ) {
|
||||
$snmphost = trim(shell_exec($config['snmpget'] ." -m SNMPv2-MIB -Oqv -$snmpver -c $community $host:$port sysName.0 | sed s/\"//g"));
|
||||
echo($config['snmpget'] ." -m SNMPv2-MIB -Oqv -$snmpver -c $community $host:$port sysName.0");
|
||||
$snmphost = trim(str_replace("\"", "", shell_exec($config['snmpget'] ." -m SNMPv2-MIB -Oqv -$snmpver -c $community $host:$port sysName.0")));
|
||||
# var_dump($snmphost);
|
||||
if ($snmphost == $host || $hostshort = $host) {
|
||||
$return = createHost ($host, $community, $snmpver, $port);
|
||||
|
||||
Reference in New Issue
Block a user