Cosmit
-
Posts
36 -
Joined
-
Last visited
Content Type
Profiles
Forums
Gallery
Downloads
Blogs
Events
Posts posted by Cosmit
-
-
42 минуты назад, TheBB сказал:
любой (не)понравившийся Makefile. если хотите собирать нативно - Entware, если кросс - Debian (или другой GNU/Linux)
помогите собрать - я не силен в этом
-
выбор пал на эту версию бо в репозитори Entware Nagios 3.5 - тоже древний (nagios_3.5.1-1b_mipsel-3x.ipk)
как подготовить Makefile - где есть подобие ???
и в какой системе компилить в Entware или под Debian ???
-
Подскажите как собрать пакет nagios-nrpe-plugin
надо check_nrpe под Entware
какие исходники взять
исходники нашел тут
1 https://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.15/
-
13 минуты назад, Le ecureuil сказал:
Правильно, нужно отлючить firewall на вход (что очень плохо) или сделать проброс порта (однако проброс icmp не поддерживается, только tcp/udp).
и как же его выключить ? - там тока правила можно создать
-
ipv6 удалось настроить на прошивке 2.12.A.4.0-6, настраивал через веб интерфейс - ИНФО
ping6 google.com - работает и с роутера и с компа за роутером
А вот пинг с Комп1 за роутером 1 на Комп2 за роутером2 - по ipv6 не работает
-
Что логично....
Советом лутьше дельним помоги. То что я накосячил - єто и так понятно
Отправлено с моего Mi A1 через Tapatalk
-
4 часа назад, Le ecureuil сказал:
На текущей версии 2.11 есть известные проблемы, если вам очень нужен IPv6 можете установить 2.12, или дождитесь выхода новой версии 2.11.
Обновил прошивку до последней 2.12.A.5.0-8 - ipv6 не работает, так еще и часть пакетов opkg перестала работать
ок
нашел прошивку 2.12.A.4.0-9 - откатился - ipv6 не работает, opkg - все норм, но в прошивку установились почти все компоненты прошивки.
если убираю галочки чтоб удалить компоненты прошивки то они удаляються но всместе с этим и ставиться последняя прошивка 2.12.A.5.0-8
-
Прошивка 2.11.C.1.0-3
Настраивал IPV6 по инструкции тут
вкратце подключение IPOE (от провайдера получаю настройки по DHCP)
в Cli набирал это
interface TunnelSixToFour0 ipv6 force-default up exit ipv6 name-server 2001:4860:4860::8888 ipv6 name-server 2001:4860:4860::8844 system config-save
но ping -6 google.com не работает
-
в связи с переходом на php 7.0
в файле .../share/www/nagios/includes/rss/rss_parse.inc заменить строку
153 list($ns, $el) = split( ':', $element, 2);
на
153 list($ns, $el) = explode( ':', $element, 2);
-
TheBB
раньше просто распаковал, права выставил и работало на Entware-3х
а Debian тяжеловат для Keenetic II - все еле ворочаеться
-
Скачал пакет jessie nagios-nrpe-plugin_2.15-1_mipsel.deb
распаковал check_nrpe в /opt/lib
а запускаться не хочет
./check_nrpe: error while loading shared libraries: libc.so.0: cannot open shared object file: No such file or directory
файла самого нет libc.so.0 Есть такой libc.so.6
сделал ссылку
ln -s libc-2.25.so /opt/lib/libc.so.0
Ничего не помогло
-
В 24.11.2016 в 23:22, TheBB сказал:
заменить #!/usr/bin/perl на #!/opt/bin/perl в самой первой строке
нужен будет перловый модуль DNS
Перестал работать скрипт после обновляние прошивки Keenetic II до версии Linux mips 2.10.A.6.0-0
root@Keenetic:/opt/lib# ./check_bl Trace/breakpoint trap
Помогите советом
-
Можно банально сменить стпндартный порт 22 SSHв в кофиге /opt/etc/init.d/S..dropbear
-
-
Заменил #!/usr/bin/perl на #!/opt/bin/perl в самой первой строке ( Подумал что это коментарии)
Установил
opkg install perlbase-getopt opkg install perlbase-data opkg install perlbase-net
Скачал и разпаковал в /opt/lib/perl ... по нужным директориям
https://packages.debian.org/wheezy/mipsel/libnet-dns-perl/download
на файлы *.so выставил розрешения Cmod 755
Все работа - Всем спс за подсказки !!
-
А как правильно сменить локаль ?
dpkg-reconfigure locales -не срабатывает.
Чтоб МС нормально запускался - без крарозябров
и хочеться конешно ru_RU.UTF-8
-
насколько мне удалось разобраться то скрип использует модули Perl
подскажите что подправить или добавить
синтаксис для запуска такой
./check_bl -H mail.ru -B zen.spamhaus.org bl.spamcop.net dnsbl.ahbl.org dnsbl.njabl.org dnsbl.sorbs.net virbl.dnsbl.bit.nl rbl.efnet.org
Скрытый текст#!/usr/bin/perl -w # # check_bl plugin for nagios # $Revision: 1.0 $ # # Nagios plugin designed to warn you if you mail servers appear in one of the # many anti-spam 'blacklists' # # By Sam Bashton, Bashton Ltd # bashton.com/content/nagios-plugins # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA use strict; use lib "/opt/lib"; #use lib "/usr/local/nagios/libexec"; use utils qw($TIMEOUT %ERRORS &print_revision &support); use Net::DNS; use vars qw($PROGNAME); my ($verbose,$host),; my ($opt_V,$opt_h,$opt_B,$opt_H,$opt_c); $opt_V = $opt_h = $opt_B = $opt_H = $opt_c = ''; my $state = 'UNKNOWN'; sub print_help(); sub print_usage(); $PROGNAME = "check_bl"; $ENV{'BASH_ENV'}=''; $ENV{'ENV'}=''; $ENV{'PATH'}=''; $ENV{'LC_ALL'}='C'; use Getopt::Long; Getopt::Long::Configure('bundling'); GetOptions( "V" => \$opt_V, "version" => \$opt_V, "h" => \$opt_h, "help" => \$opt_h, "H=s" => \$opt_H, "hostname=s" => \$opt_H, "B=s" => \$opt_B, "blacklists=s" => \$opt_B, "c=s" => \$opt_c, "critical=s" => \$opt_c ); # -h means display verbose help screen if ($opt_h) { print_help(); exit $ERRORS{'OK'}; } # -V means display version number if ($opt_V) { print_revision($PROGNAME,'$Revision: 1.0 $ '); exit $ERRORS{'OK'}; } # First check the hostname is OK.. unless ($opt_H) { print_usage(); exit $ERRORS{'UNKNOWN'}; } if (! utils::is_hostname($opt_H)){ print "$opt_H is not a valid host name\n"; print_usage(); exit $ERRORS{"UNKNOWN"}; }else{ if ($opt_H =~ /[a-zA-Z]/ ) # If the host contains letters we assume it's a hostname, not an IP { $host = lookup($opt_H); } else { $host = $opt_H } } # $opt_c is a count of the blacklists a mail server is in, # after which state will be CRITICAL rather than WARNING # By default any listing is CRITICAL my $critcount = 0; if ($opt_c) { $critcount = $opt_c }; # $opt_B is a comma seperated list of blacklists $opt_B = shift unless ($opt_B); unless ($opt_B) { print_usage(); exit -1 } my @bls = split(/,/, $opt_B); # Just in case of problems, let's not hang Nagios $SIG{'ALRM'} = sub { print ("ERROR: No response from BL server (alarm)\n"); exit $ERRORS{"UNKNOWN"}; }; alarm($TIMEOUT); my %listed; # Hash of blacklists we're listed in. foreach(@bls) { if (blcheck($host,$_)) { $listed{$_} = 1 } } if (scalar(keys(%listed)) == 0) { $state = 'OK' } elsif (scalar(keys(%listed)) < $critcount) { $state = 'WARNING' } else { $state = 'CRITICAL' } if (%listed) { print "Listed at"; foreach (keys(%listed)) { print " $_" } print "\n"; } else { print "Not black-listed\n" } exit $ERRORS{$state}; ######## Subroutines ========================== sub print_help() { print_revision($PROGNAME,'$Revision: 1.0 $ '); print "\n"; support(); } sub print_usage () { print "Usage: \n"; print " $PROGNAME -H host -B [blacklist1],[blacklist2] [-c critnum]\n"; print " $PROGNAME [-h | --help]\n"; print " $PROGNAME [-V | --version]\n"; } sub blcheck { my ($ip, $bl) = @_; my $lookupip = $ip; $lookupip =~ s/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/$4.$3.$2.$1.$bl/; if (lookup($lookupip)) { return 1 } else { return 0 } } sub lookup { my $tolookup = shift; my $res = Net::DNS::Resolver->new; my $query = $res->search($tolookup); if ($query) { foreach my $rr ($query->answer) { next unless $rr->type eq "A"; # We're not interested in TXT records return $rr->address; } } }
-
TheBB
Check_nrpe в nagios_plugins - возможно скомпилить ???
nagios-nrpe-plugin - Скачал, разпаковал, выставил права - работа
-
TheBB
И всетаки.
15 часов назад, Cosmit сказал:Ещё мона конешно добавить скипт запуска Nagios в /opt/etc/init.d/
#!/bin/sh
ENABLED=yes
PROCS=nagios
ARGS="-d /opt/etc/nagios/nagios.cfg"
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin. /opt/etc/init.d/rc.func
и в /opt/etc/nagios/cgi.cfg заменить nagiosadmin на root
и в /opt/var/ создать каталог rw
-
@TheBB
В пакете отсудствуют файлы
statusmap.cgi - строит карту
trends.cgi - графики
histogram.cgi - гистораммы
Если знать где лежать исходники и куда их положить для компиляции то могу пересобрать
-
Ещё мона конешно добавить скипт запуска Nagios в /opt/etc/init.d/
Скрытый текст#!/bin/sh
ENABLED=yes
PROCS=nagios
ARGS="-d /opt/etc/nagios/nagios.cfg"
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin. /opt/etc/init.d/rc.func
и в /opt/etc/nagios/cgi.cfg заменить nagiosadmin на root
и в /opt/var/ создать каталог rw
- 2
-
zyxmon & TheBB
Спасибо всем за помощь !!!
Пакеты пересобрал и выложил - если можно, добавте в репозиторий keen3x
-
Вопрос - Как указать чтоб в пакете NAGIOS фали по пути /opt/share/www переложить в opt/share/www/nagios ???
-
nagios Makefile
Скрытый текст#
# Copyright (C) 2008-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is the last release from 3.x fork. We not going to update it in futureinclude $(TOPDIR)/rules.mk
PKG_NAME:=nagios
PKG_VERSION:=3.5.1
PKG_RELEASE:=1aPKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/nagios/nagios-3.x/nagios-3.5.1
PKG_MD5SUM:=9947ed3d220b4da86710884260d42856include $(INCLUDE_DIR)/package.mk
PKG_UNPACK:=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xf -
define Package/nagios
SECTION:=admin
CATEGORY:=Administration
DEPENDS:=+libpthread +perl +libltdl +libgd +libjpeg +libpng +zlib
TITLE:=service and network monitoring program
URL:=http://www.nagios.org/
endefdefine Package/nagios/description
service and network monitoring program
endefEXTRA_CFLAGS += $(TARGET_CPPFLAGS)
CONFIGURE_ARGS += \
--with-nagios-user="root" \
--with-nagios-group="root" \
--with-command-user="root" \
--with-command-group="root" \
--sysconfdir="/opt/etc/nagios" \
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
INSTALL_OPTS="" \
STRIP=: \
all install install-config
endefdefine Package/nagios/install
$(INSTALL_DIR) $(1)/opt/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/opt/bin/nagios{,tats} $(1)/opt/bin
$(INSTALL_DIR) $(1)/opt/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/opt/sbin/*.cgi $(1)/opt/sbin
$(INSTALL_DIR) $(1)/opt/etc/nagios/objects
$(INSTALL_CONF) \
$(PKG_INSTALL_DIR)/opt/etc/nagios/*.cfg \
$(1)/opt/etc/nagios
$(INSTALL_CONF) \
$(PKG_INSTALL_DIR)/opt/etc/nagios/objects/*.cfg \
$(1)/opt/etc/nagios/objects
$(INSTALL_DIR) $(1)/opt/share/www
$(CP) $(PKG_INSTALL_DIR)/opt/share/* $(1)/opt/share/www
$(INSTALL_DIR) $(1)/opt/var/{spool/checkresults,archives}
endefdefine Package/nagios/conffiles
/opt/etc/nagios/
endef$(eval $(call BuildPackage,nagios))
nagios-plugins Makefile
Скрытый текст#
# Copyright (C) 2008-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Depends on nagios 3.x only, no need to update it in futureinclude $(TOPDIR)/rules.mk
PKG_NAME:=nagios-plugins
PKG_VERSION:=2.0.3
PKG_RELEASE:=1aPKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://nagios-plugins.org/download
PKG_MD5SUM:=6755765bab88b506181268ef7982595ePKG_FIXUP:=autoreconf
PKG_INSTALL:=1include $(INCLUDE_DIR)/package.mk
define Package/nagios-plugins
SECTION:=admin
CATEGORY:=Administration
DEPENDS:=+libopenssl +libpthread +librt +bash
TITLE:=plugins for Nagios checks
URL:=http://nagiosplug.sourceforge.net/
endefCONFIGURE_ARGS += \
--with-trusted-path="/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin" \
--with-perl="/opt/bin/perl" \
--with-openssl="$(STAGING_DIR)/opt" \
--without-pgsql \
--without-radius \
--without-ldap \
--without-mysql \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
--with-ping-command="/opt/bin/ping -w %d -c %d %s" \
--with-ping6-command="/opt/bin/ping6 -w %d -c %d %s" \
--with-ps-command="/opt/bin/ps w" \
--with-ps-cols="6" \
--with-ps-format="%d %s %d %s %s %n" \
--with-ps-varlist="&procpid$(comma)&procuid$(comma)&procvsz$(comma)procstat$(comma)procprog$(comma)&pos" \
--with-uptime-command="/opt/bin/uptime" \
--with-ssh-command="/opt/bin/ssh" \
--with-nslookup-command="/opt/bin/nslookup"define Package/nagios-plugins/install
$(INSTALL_DIR) $(1)/opt/lib
$(CP) $(PKG_INSTALL_DIR)/opt/lib/* $(1)/opt/lib
$(SED) 's,/bin/bash,/opt/bin/bash,g' \
$(1)/opt/lib/check_{log,oracle,sensors}
endef$(eval $(call BuildPackage,nagios-plugins))
Самостоятельная сборка пакетов
in Вопросы по сборке и настройке Opkg
Posted
Супер - спасибо, вроде работает