The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



"MRTG: Unknown SNMP var hrSystemUptime.0"
Версия для распечатки Пред. тема | След. тема
Форум Открытые системы на сервере
Исходное сообщение [ Отслеживать ]
Присылайте удачные настройки в раздел примеров файлов конфигурации на WIKI.opennet.ru.
"MRTG: Unknown SNMP var hrSystemUptime.0" +/
Сообщение от A Clockwork Orange (?), 28-Сен-23, 11:43 
В файле конфигурации mrtg
LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
RouterUptime[localhost_2]: hrSystemUptime.0:public@localhost

Из консоли
[admin@localhost:/etc/snmp]$ snmpget -v 2c -c public localhost hrSystemUptime.0
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (2962479528) 342 days, 21:06:35.28

При запуске mrtg возникает ошибка
Unknown SNMP var hrSystemUptime.0
at /usr/bin/mrtg line 657

Строки кода mrtg

625         # Get the uptime and device name from the alternate location (community@host or
626         # (OID:community@host or OID) that may have been specified with the RouterUptime
627         # target keyword
628         if( defined $rcfg->{ routeruptime }{ $rou } ) {
629                 my( $noid, $nloc ) = split( /:/, $rcfg->{ routeruptime }{ $rou }, 2 );
630                 # If only location (community@host) was specified then
631                 # move the location details into the right place
632                 if( $noid =~ /@/ ) {
633                         $nloc = $noid;
634                         $noid = undef;
635                 }
636                 # If no OID (community@host) was specified use the hardcoded default
637                 if( not $noid ) {
638                         $noid = 'sysUptime';
639                 }
640                 # If no location (community@host) was specified use values from the
641                 # unique target referred to in the monitored data calculation
642                 if( not $nloc ){
643                         if ($u >= 0) {
644                             my $comm = $target->[ $u ]{ Community };
645                             my $host = $target->[ $u ]{ Host };
646                             my $opt = $target->[ $u ]{ SnmpOpt };
647                             $nloc = "$comm\@$host$opt";
648                         } else {
649                             die "$NOW: ERROR: You must specify the location part of the RouterUptime oid for non unique targets! ($rou)\n";
650                         }
651                 }
652
653                 $uploc = $nloc;
654                 # Get the device uptime if $noid(OID) and $nloc (community@host) have been specified
655                 # one way or the other
656                 debug('base', "Fetching sysUptime and sysName from: $noid:$nloc");
657                 ( $uptime, $name ) = snmpget( $uploc, $rcfg->{ snmpoptions }{ $rou }, $noid, 'sysName');
658         }


Указание OID не помогает.
В режиме отладки mrtg показывает эту ошибку, других подробностей о ней нет.

Ответить | Правка | Cообщить модератору

Оглавление
MRTG: Unknown SNMP var hrSystemUptime.0, A Clockwork Orange, 28-Сен-23, 11:43  [смотреть все]
Форумы | Темы | Пред. тема | След. тема



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру