Giter Site home page Giter Site logo

librenms-agent's Introduction

Test Status

Introduction

LibreNMS is an auto-discovering PHP/MySQL/SNMP based network monitoring which includes support for a wide range of network hardware and operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade, Foundry, HP and many more.

We intend LibreNMS to be a viable project and community that:

  • encourages contribution,
  • focuses on the needs of its users, and
  • offers a welcoming, friendly environment for everyone.

The Debian Social Contract will be the basis of our priority system, and mutual respect is the basis of our behavior towards others.

Documentation

Documentation can be found in the doc directory or docs.librenms.org, including instructions for installing and contributing.

Participating

You can participate in the project by:

VM image

You can try LibreNMS by downloading a VM image. Currently, a Ubuntu-based image is supplied and has been tested with VirtualBox.

Download one of the VirtualBox images we have available, documentation is provided which details login credentials and setup details.

License

Copyright (C) 2006-2012 Adam Armstrong [email protected]

Copyright (C) 2013-2024 by individual LibreNMS contributors

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 3 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, see https://www.gnu.org/licenses/.

LICENSE.txt contains a copy of the full GPLv3 licensing conditions.

The following additional license conditions apply to LibreNMS (a GPL exception):

As a special exception, you have permission to link or otherwise combine LibreNMS with the included copies of the following third-party software, and distribute modified versions, as long as you follow the requirements of the GNU GPL v3 in regard to all of the remaining software (comprising LibreNMS).

Please see Acknowledgements

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]

librenms-agent's People

Contributors

anaelmobilia avatar arrmo avatar bestlong avatar bnerickson avatar crcro avatar dsgagi avatar exarv avatar f0o avatar fbourqui avatar fingerlessglov3s avatar florianbeer avatar jasoncheng7115 avatar jellyfrog avatar karlshea avatar laf avatar munzy avatar murrant avatar npeca75 avatar paulgear avatar pipocanaja avatar priiduonu avatar redchops avatar serphentas avatar slashdoom avatar sourcedoctor avatar sparknsh avatar svennd avatar trae32566 avatar tuxis-ie avatar vvelox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

librenms-agent's Issues

zfs-freebsd: Can't run on FreeNAS

It requires a perl module that doesn't come with FreeNAS, and you can't really alter OS packages on FreeNAS because they get blown away each time you upgrade. What I did is port the script to python and only used the standard library.

Note shebang line specific to system... /usr/bin/env python3 failed on FreeNAS so I haxed it. Needs fixed properly.

#!/usr/local/bin/python3

import json
import subprocess

def percent(numerator, denominator, default=0):
	try:
		return numerator / denominator * 100
	except ZeroDivisionError:
		return default

def main(args):
	p = subprocess.run(['/sbin/sysctl', '-q', 'kstat.zfs', 'vfs.zfs'], stdout=subprocess.PIPE, universal_newlines=True)
	
	if p.returncode != 0:
		return p.returncode

	def chomp(line):
		bits = [b.strip() for b in line.split(':')]
		return bits[0], int(bits[1])
	stats = dict(chomp(l) for l in p.stdout.splitlines())
	if 'kstat.zfs.misc.arcstats.recycle_miss' not in stats:
		stats['kstat.zfs.misc.arcstats.recycle_miss'] = 0

	output = dict()

	# ARC misc
	output['deleted'] = stats['kstat.zfs.misc.arcstats.deleted']
	output['evict_skip'] = stats['kstat.zfs.misc.arcstats.evict_skip']
	output['mutex_skip'] = stats['kstat.zfs.misc.arcstats.mutex_miss']
	output['recycle_miss'] = stats['kstat.zfs.misc.arcstats.recycle_miss']

	# ARC size
	output['target_size_per'] = stats['kstat.zfs.misc.arcstats.c'] / stats['kstat.zfs.misc.arcstats.c_max'] * 100
	output['arc_size_per'] = stats['kstat.zfs.misc.arcstats.size'] / stats['kstat.zfs.misc.arcstats.c_max'] * 100
	output['target_size_arat'] = stats['kstat.zfs.misc.arcstats.c'] / stats['kstat.zfs.misc.arcstats.c_max']
	output['min_size_per'] = stats['kstat.zfs.misc.arcstats.c_min'] / stats['kstat.zfs.misc.arcstats.c_max'] * 100

	output['arc_size'] = stats['kstat.zfs.misc.arcstats.size']
	output['target_size_max'] = stats['kstat.zfs.misc.arcstats.c_max']
	output['target_size_min'] = stats['kstat.zfs.misc.arcstats.c_min']
	output['target_size'] = stats['kstat.zfs.misc.arcstats.c']

	# ARC size breakdown
	output['mfu_size'] = stats['kstat.zfs.misc.arcstats.size'] - stats['kstat.zfs.misc.arcstats.p']
	output['p'] = stats['kstat.zfs.misc.arcstats.p']
	output['rec_used_per'] = stats['kstat.zfs.misc.arcstats.p'] / stats['kstat.zfs.misc.arcstats.size'] * 100
	output['freq_used_per'] = output['mfu_size'] / stats['kstat.zfs.misc.arcstats.size'] * 100

	# ARC misc efficiency stats
	output['arc_hits'] = stats['kstat.zfs.misc.arcstats.hits']
	output['arc_misses'] = stats['kstat.zfs.misc.arcstats.misses']
	output['demand_data_hits'] = stats['kstat.zfs.misc.arcstats.demand_data_hits']
	output['demand_data_misses'] = stats['kstat.zfs.misc.arcstats.demand_data_misses']
	output['demand_meta_hits'] = stats['kstat.zfs.misc.arcstats.demand_metadata_hits']
	output['demand_meta_misses'] = stats['kstat.zfs.misc.arcstats.demand_metadata_misses']
	output['mfu_ghost_hits'] = stats['kstat.zfs.misc.arcstats.mfu_ghost_hits']
	output['mfu_hits'] = stats['kstat.zfs.misc.arcstats.mfu_hits']
	output['mru_ghost_hits'] = stats['kstat.zfs.misc.arcstats.mru_ghost_hits']
	output['mru_hits'] = stats['kstat.zfs.misc.arcstats.mru_hits']
	output['pre_data_hits'] = stats['kstat.zfs.misc.arcstats.prefetch_data_hits']
	output['pre_data_misses'] = stats['kstat.zfs.misc.arcstats.prefetch_data_misses']
	output['pre_meta_hits'] = stats['kstat.zfs.misc.arcstats.prefetch_metadata_hits']
	output['pre_meta_misses'] = stats['kstat.zfs.misc.arcstats.prefetch_metadata_misses']

	output['anon_hits'] = output['arc_hits'] - (output['mfu_hits'] + output['mru_hits'] + output['mfu_ghost_hits'] + output['mru_ghost_hits'])
	output['arc_accesses_total'] = output['arc_hits'] + output['arc_misses']
	output['demand_data_total'] = output['demand_data_hits'] + output['demand_data_misses']
	output['pre_data_total'] = output['pre_data_hits'] + output['pre_data_misses']
	output['real_hits'] = output['mfu_hits'] + output['mru_hits']

	# ARC efficiency percents
	output['cache_hits_per'] = percent(output['arc_hits'], output['arc_accesses_total'])
	output['cache_miss_per'] = percent(output['arc_misses'], output['arc_accesses_total'])
	output['actual_hit_per'] = percent(output['real_hits'], output['arc_accesses_total'])
	output['data_demand_per'] = percent(output['demand_data_hits'], output['demand_data_total'])
	output['data_pre_per'] = percent(output['pre_data_hits'], output['pre_data_total'])
	output['anon_hits_per'] = percent(output['anon_hits'], output['arc_hits'])
	output['mru_per'] = percent(output['mru_hits'], output['arc_hits'])
	output['mfu_per'] = percent(output['mfu_hits'], output['arc_hits'])
	output['mru_ghost_per'] = percent(output['mru_ghost_hits'], output['arc_hits'])
	output['mfu_ghost_per'] = percent(output['mfu_ghost_hits'], output['arc_hits'])
	output['demand_hits_per'] = percent(output['demand_data_hits'], output['arc_hits'])
	output['pre_hits_per'] = percent(output['pre_data_hits'], output['arc_hits'])
	output['meta_hits_per'] = percent(output['demand_meta_hits'], output['arc_hits'])
	output['pre_meta_hits_per'] = percent(output['pre_meta_hits'], output['arc_hits'])
	output['demand_misses_per'] = percent(output['demand_data_misses'], output['arc_misses'])
	output['pre_misses_per'] = percent(output['pre_data_misses'], output['arc_misses'])
	output['meta_misses_per'] = percent(output['demand_meta_misses'], output['arc_misses'])
	output['pre_meta_misses_per'] = percent(output['pre_meta_misses'], output['arc_misses'])

	# pools
	p = subprocess.run(['/sbin/zpool', 'list', '-pH'], stdout=subprocess.PIPE, universal_newlines=True)
	if p.returncode != 0:
		return p.returncode
	output['pools'] = []
	fields = ['name', 'size', 'alloc', 'free', 'expandsz', 'frag', 'cap', 'dedup']
	for l in p.stdout.splitlines():
		p = dict(zip(fields, l.split('\t')))
		if p['expandsz'] == '-':
			p['expandsz'] = 0
		p['frag'] = p['frag'].rstrip('%')
		if p['frag'] == '-':
			p['frag'] = 0
		p['dedup'] = p['dedup'].rstrip('x')
		output['pools'].append(p)

	print(json.dumps(output))

	return 0

if __name__ == '__main__':
	import sys
	sys.exit(main(sys.argv[1:]))

snmp mysql script seems to be flawed

  1. the script does not provide a simple output variable indicating if the host is a mysql slave at all or not. This would enable the monitoring host to switch slave status data on or off, depending on if there is anything to monitor at all.

  2. In lines 414 to 418 it is setting the slave_running and slave_stopped output variables in a way that makes them very hard to use sensibly. For example, if slave_sql_running is not Yes, the value is set to 0. If if is Yes BUT slave delay is zero (which happens to be the case really often), it is ALSO 0. So to determine if your replication needs attention, you would have to check if lag is >0 AND sql_running is == 0.

smart script doesn't handle nvme drives

I have a server with a single NVMe drive and no other SATA or SAS drives. The smart -g option to generate a config does not seem to account for NVMe devices at all. Manually editing smart.config to set device type of NVMe also results in the script outputting no data.

$ cat smart.config
useSN=0
smartctl=/usr/sbin/smartctl
cache=/var/cache/smart
# # scan_smart_devices: glob(3) aborted matching pattern /dev/discs/disc*
nvme0n1 /dev/nvme0n1 -d nvme

add support for icecast2?

Hi,

Is it possible to monitor the amout of listeners from an icecast server?

I have setup this script that pushes the amount of listners via snmp.
https://github.com/mattyribbo/icecast2-snmp

Output from snmpwalk:
`user@librenms:/$ snmpwalk -c secret -v 2c 192.168.3.2 .1.3.6.1.4.1.8000.2.1

iso.3.6.1.4.1.8000.2.1 = Gauge32: 0
`

Also I have tried the shoutcast application but not sure it will work with Icecast or if I have configured it incorrectly?

Recommend removing file librenms-agent/agent-local/bind

This led to me to some confusion following the new BIND/Named application update. Since the agent is actually one and the same as the SNMP extend script now I'm thinking librenms-agent/agent-local/bind is obsolete and should be removed.

librenms-agent/snmp/exim-stats.sh resturns only frozen emails

Hi,

I am trying to use librenms-agent/snmp/exim-stats.sh with Exim app in LibreNMS. It returns only one line containing number of frozen emails. While in fact it should return also queue size:

./includes/polling/applications/exim-stats.inc.php:

[...]
$stats = snmp_get($device, $oid, '-Oqv');

echo ' '.$name;

list ($frozen, $queue) = explode("\n", $stats);
[...]

osupdate script doesn't work on Fedora

It appears that the latest changes to the osupdate script broke the package-manager detection on Fedora and possible other OSes too.
I am not sure, but I think the addition of '/usr/bin/env' in the variables in combination with the usage of '-f' doesn't work. The script always falls back to the last 'echo "0"' statement.
When I update the script to use the full path to the package manager (/usr/bin/dnf in case of Fedora) without adding /usr/bin/env it does work.

multiple apps broken since February 6th including bind and mysql

The bind and mysql application graphs appear to no longer function. A debug poller run shows it is no longer looking for these apps so I suspect it's an issue in the librenms repo. Example:
https://nms.baxterit.net/graphs/to=1488515700/id=7/type=application_mysql_connections/from=1485837300/ demo:demo
====reverb debug
Debug poller run of the unix agent: http://pastebin.com/iEVZYdLB
telnet to the agent port: http://pastebin.com/B3x9uf7z
====echo debug
http://paste.ubuntu.com/24100174/
telnet to other servers agent port: http://pastebin.com/m5kfubs4

zfs-linux attempts to use a switch (-p) not yet ported from freebsd

proc = subprocess.run(['/sbin/zpool', 'list', '-pH'], stdout=subprocess.PIPE, universal_newlines=True)

The -p switch for parseable isn't available in most packages for ZFS on Linux. In fact, it was only committed to the upstream late last year. Presumably this is a hangover from the original FreeBSD version of the command.

This is breaking on all Ubuntu up to and including 19.04.

mysql script doesn't support unix sockets

The mysql script doesn't seem to support connecting to the mysql server over a unix socket. This is important for mysql servers like MariaDB that can authenticate users via unix_socket. This would allow us to run the mysql script on the localhost without embedding a password in the script. Please fix.

OpenWrt not detected

Hi,
LibreNMS keeps detecting all of my OpenWRT/Lede devices as Linux and then kernel version.
Version of OpenWRT or Lede makes no difference as well as kernel version.

I can manually over SSH use cat /etc/openwrt_version and I will get the version
It seems that discovery script may be broken?

OS-Updates slow

All my Linux-based servers are SNMP-extended with "os-updates.sh". Sometimes, this scripts takes ages to complete (sometimes 10+ seconds), which results in a time-out on the poller script.

Result: Application OS-Updates will be remove and added later, when the scripts finishes in time, next time the poller requests this value.

As a suggestion/feature-request/discussion, I propose the following procedure:

  1. Load the value of "os-updates.txt"
  2. Immediately return this "old/previous" value
  3. Check for updates in the background and save this to the "os-updates.txt"

Pro: Script return immediately, no time-outs nor high poller-times
Con: The returned value is "old", as in: the previous value.

What do you guys think? Is this acceptable? A improvement?

If so, I could rewrite the "os-update.sh"!

smart script does not go well with enterprise devices

The smart script expects quite a number of vendor specific attributes to be printed by smartctl -A.

However, in many circumstances, especially on disks run by some Enterprise host controllers like LSI Megaraid, often only general information is printed and not a single "numbered" vendor specific attribute is listed. The result is that the smart script returns an array of "null" and "0" values, totally unusable.

The script should detect the general absence of the character sequence "Vendor Specific SMART Attributes" (or alternatively "SMART Attributes Data Structure"), e.g.when it is called with "-g" and warn the user that monitoring wont work here.
Alternatively there could be a fallback mode in the script, that uses "smartctl -a" instead of "smartctl -A" to extract at least basic health info like errors corrected/uncorrected, temperature and such.

Portactivity returning only zero values

Hello,

I found out that the compare string is wrong in portactivity extend script for snmp, it is comparing for example http with 80 which will not be equal ever.

Best regards.

[Feature Request] Postgres Graphing

Hello,
I would like to see some sort of graphing for postgres similar to what is available for mysql, I am not a programmer so I wouldn't be able to help. If someone is able to do this without a lot of effort it would be greatly appreciated.
Thanks

LibreNMS detects wrong PHP version via validate.php?

Hi,

LibreNMS worked fine on my old server. But, when it's being migrated to a new server, it dectects wrong PHP version via running the file validate.php, output:
Component | Version
LibreNMS |
DB Schema | ?
PHP | 5.4.45
MySQL | ?
RRDTool | 1.3.8
SNMP | NET-SNMP 5.5

[FAIL] Composer has not been run, dependencies are missing [FIX] composer install --no-dev

My old server:

  • OS: CentOS 7.x
  • PHP: 7.0.23
  • LibreNMS: 1.32

My new server:

  • OS: CloudLinux Server release 6.9
  • PHP: 5.6.4 (with multi-PHP version support)
  • LibreNMS: 1.39

Besides, when i run the command "composer install --no-dev" on my new server, it output with nothing (does not automatically install additional PHP packages).

Wrong comparison in zfs-freebsd

On line 118 of zfs-freebsd, the condition $sysctls->{"kstat.zfs.misc.arcstats.size"} >= $sysctls->{"kstat.zfs.misc.arcstats.size"} is checked.

It will in fact always return true, so perhaps one should double check what condition should be evaluated here.

I don't know ZFS stats in detail myself but it certainly doesn't look like it is the expected behaviour, given that an else statement follows right after.

apache-stats.py causes IndexError on Ubuntu 16.04 Apache 2.4

Hi,

When I run apache-stats.py on my Ubuntu 16.04/Apache 2.4 server I get this error:

Traceback (most recent call last):
File "/etc/snmp/apache-stats.py", line 67, in
params[fields[0]] = fields[1]
IndexError: list index out of range

Looking at the output of server-status, I can see that not every line follows "key : value".

My inelegant solution was to add a try catch block starting line 61:

	else:
		# just store everything else
		params[fields[0]] = fields[1]

        else:
                # just store everything else
                try:
                        params[fields[0]] = fields[1]
                except:
                        params[fields[0]] = ''

Debian package doesnt pass lintian

This is really just for the logs

W: librenms-agent: syntax-error-in-debian-changelog line 5 "badly formatted trailer line"
W: librenms-agent: syntax-error-in-debian-changelog line 11 "badly formatted trailer line"
W: librenms-agent: syntax-error-in-debian-changelog line 17 "badly formatted trailer line"
W: librenms-agent: syntax-error-in-debian-changelog line 23 "badly formatted trailer line"
W: librenms-agent: syntax-error-in-debian-changelog line 29 "badly formatted trailer line"
W: librenms-agent: syntax-error-in-debian-changelog line 35 "badly formatted trailer line"
E: librenms-agent: no-copyright-file
W: librenms-agent: extended-description-line-too-long
W: librenms-agent: binary-without-manpage usr/bin/check_mk_agent
W: librenms-agent: binary-without-manpage usr/bin/distro
W: librenms-agent: binary-without-manpage usr/bin/mk_enplug
E: librenms-agent: python-script-but-no-python-dep usr/lib/check_mk_agent/repo/ceph
E: librenms-agent: php-script-but-no-phpX-cli-dep usr/lib/check_mk_agent/repo/memcached
E: librenms-agent: php-script-but-no-phpX-cli-dep usr/lib/check_mk_agent/repo/mysql
E: librenms-agent: python-script-but-no-python-dep usr/lib/check_mk_agent/repo/nginx
E: librenms-agent: python-script-but-no-python-dep usr/lib/check_mk_agent/repo/powerdns
W: librenms-agent: executable-not-elf-or-script usr/lib/check_mk_agent/repo/munin
W: librenms-agent: command-with-path-in-maintainer-script postinst:20 /usr/bin/mk_enplug
W: librenms-agent: command-with-path-in-maintainer-script postinst:21 /usr/bin/mk_enplug

pi-hole Application snmp extend script

DO NOT DELETE THIS INFORMATION.

Please read this information carefully.

GitHub issues is for known/validated bugs, please do not post issues asking for help or how to do X, Y or Z.

You can use our Discord server to ask questions or our community site.

If you have a feature request please post this on our community site.

Please confirm each of the sections below by putting an x in the box like [x].

[x ] Is your install up to date? Updating your install
Please do not submit an issue if your install is not up to date within the last 24 hours or on a stable monthly release.
[ x] Please include all of the information between the ==================================== section of ./validate.php which you can run from the cli.

Component Version
LibreNMS 1.33-384-g87ce23b
DB Schema 230
PHP 7.0.25
MySQL 10.1.30-MariaDB
RRDTool 1.7.0
SNMP NET-SNMP 5.7.2
[x ] Please provide ALL info asked for here.
https://p.libren.ms/view/a0b171aa
https://p.libren.ms/view/91b93798
https://p.libren.ms/view/2f059813

[ x] Please provide as much detail as possible.
hi there I am having trouble getting the pi-hole application monitor to work on Centos 7.4. It worked fine on my old ubuntu 16 server.
I have enabled the application in the librenms web interface, and enable the extend script in the SNMPD config file, and set my pi-hole API in the pi-hole script
This is being done on Centos 7.4 x64
/etc/snmp/snmpd.conf:
#Distro Detection
extend .1.3.6.1.4.1.2021.7890.1 distro /etc/snmp/distro
extend apache /etc/snmp/apache-stats.py
extend osupdate /etc/snmp/os-updates.sh
extend pi-hole /etc/snmp/pi-hole
#extend distro /etc/snmp/distro
extend mysql-stats /etc/snmp/mysql-stats
extend smart /etc/snmp/smart -c /etc/snmp/smart.config

Please do NOT post more than 10 lines of debug information here, use a pastebin service or GitHub Gists.
The script generates an error
./pi-hole
parse error: Invalid numeric literal at line 1, column 10
./pi-hole --debug
[ok] tr bin
[ok] jq bin
[ok] curl bin
[ok] API_URL is set
[ok] API_AUTH_KEY is set
[ok] URL_READ_ONLY is set
[ok] URL_QUERY_TYPE not set

jq --version
jq-1.5

ceph poolstats - IOPS missing

Hi,

running ceph version 12.2.1 the IOPS are missing in the poolstats output using
the librenms-agent/agent-local/ceph Script.
(Which leads to "0" values in the librenms-rrd files and no graphs for the IOPS)

I think it's a problem with the expected value "op_per_sec" which seems to be
splittet into "read_op_per_sec" and "write_op_per_sec"

  • Manually invoking the ceph osd pool stats command
root@ceph03:~# /usr/bin/ceph -f json osd pool stats
[{"pool_name":"rbd","pool_id":0,"recovery":{},"recovery_rate":{},"client_io_rate":{"read_bytes_sec":2321507,"write_bytes_sec":139985,"read_op_per_sec":566,"write_op_per_sec":0}}]
root@ceph03:~#
  • Using this ceph Script
root@ceph03:~# /usr/lib/check_mk_agent/local/ceph  | head -n3
<<<app-ceph>>>
<poolstats>
rbd:0:139985:2321507
root@ceph03:~#
  • With slightly modifications
root@ceph03:~# /usr/lib/check_mk_agent/local/ceph_TF  | head -n3
<<<app-ceph>>>
<poolstats>
rbd:598:1222483:2304971
root@ceph03:~#
  • diff
root@ceph03:~# diff /usr/lib/check_mk_agent/local/ceph /usr/lib/check_mk_agent/local/ceph_TF
65c65
<             o = p['client_io_rate']['op_per_sec']
---
>             o = p['client_io_rate']['read_op_per_sec'] + p['client_io_rate']['write_op_per_sec']
root@ceph03:~#

Maybe someone can verify this?
I'm not even sure if this is the right place to ask or to report this issue.

Thanks!

Thomas

Proxmox agent doesnt work

Hi,

When I start /usr/lib/check_mk_agent/local/proxmox , it say keys on reference is experimental at /usr/share/perl5/PVE/API2Client.pm line 142. <<<app-proxmox>>> virt-01b 105/net0/4271661/1235810/teamviewer.econcept.local 500 Configuration file 'nodes/virt-01b/qemu-server/101.conf' does not exist

does anybody know ho to solve this ?
Thank's !

Version :

pve-manager/4.2-2/725d76f0 (running kernel: 4.4.6-1-pve)
librenms fresh installed from today on ubuntu 14.04

Apache Agent Fails

Hi,

When I try to run the apache agent (agent-local/apache), all I get for an output is,
Data fetch failure.

Is there a way to help debug this?

Thanks!

ntp-server.sh/ntp-client.sh incorrect values

This relates to ntp-server and ntp-client application poller scripts.

This issue is mostly just a placeholder issue as I've done some work on these scripts and I plan on PRing them later.

It seems the output from ntpq -c rv that these two scripts look for can vary slightly in that an extra field sometimes appears which throws off the ordering of values that these two scripts use - resulting in incorrect data being reported as everything position shifted by 1

For example

$ ntpq -c rv | grep jitter
tc=10, mintc=3, offset=-0.313, frequency=0.081, sys_jitter=4.719,
clk_jitter=0.341, clk_wander=0.000

vs

$ ntpq -c rv | grep jitter
mintc=3, offset=-0.696, frequency=16.329, sys_jitter=5.306,
clk_jitter=0.594, clk_wander=0.061

Notice the existence of tc=10 in one but not the other.

ntp-server.sh currently works with the first snippet, but the second one results in "frequency" being used as the value for "offset" etc.

My PR primarily will address the issue at hand here, but it does involve a complete rewrite of the two poller scripts - namely because I couldn't work around this issue with using the for loop as it relied on specific placement.

I also don't hard-code binary names which makes it easier to use on other Distros (The original ntp-server.sh this will replace had to have some modifications to paths in order to run on a Raspberry Pi)

I've duplicated the output of the original so this shouldn't affect existing polling logic from librenms but If someone more knowledgeable in ntp can verify the correct use of the following that be appreciated

ntp sys_jitter is used for $jitter
ntp clk_jitter is used for $noise
ntp clk_wander is used for $stability

Postgres agent not displaying any elements in UI

The postgresql agent is not displaying any graphs in the UI under 'applications->postgresql' under device.

img

When viewing the graphs under 'apps', it shows as blank graphs

img2

Graphs for other applications correctly display data.

I have added

extend postgres /etc/snmp/postgres

to the snmpd.conf and restarted the snmpd service.

When I manually run /etc/snmp/postgres I get the correct and expected output of postgresql stats.

When I manually invoke a poll of the host using poller.php I notice the output does not include postgresql:

#### Load poller module applications ####
 nginx mysql

>> Runtime for poller module 'applications': 0.9013 seconds with 104376 bytes
#### Unload poller module applications ####

Running ./validate.php returns

==========================================================
Component | Version
--------- | -------
LibreNMS  | ead3abb2c259de64fdaf592e806127bf546c23b9
DB Schema | 173
PHP       | 5.6.30-0+deb8u1
MySQL     | 5.5.54-0+deb8u1
RRDTool   | 1.4.8
SNMP      | NET-SNMP 5.7.2.1
==========================================================

[WARN]  Your install is out of date, last update: Sun, 05 Mar 2017 19:42:39 +0000
[OK]    Database connection successful
[FAIL]  You have no timezone set for php. [FIX] http://php.net/manual/en/datetime.configuration.php#ini.date.timezone

The timezone fail issue is strange - but the system functions fine without it, I've tried fixing it by setting the value and restarting php-fpm but it did not resolve issue - don't believe that to be related to this issue.

deb/rpm/etc packaging?

Any chance we can get librenms-agent packaged in a way our package managers can be aware of it? A PPA/repo might be a good idea too, so we can easily get updates for it too.

The manual steps of installation now exist outside typical software management practices in many open source OS distros.

agent (mysql) accidentally stop after successfully graph in the last 24 hours

Hello!

I've installed and running MySQL monitoring using LibreNMS and follow the instructions, the graph was successfully on the dashboard but I don't know why it is accidentally stopped.

gnome-shell-screenshot-9pisxy

I've tried to check the snmp result by running this command: snmpwalk -c public -v2c ip.ad.dr.es .1.3.6.1.4.1.8072 it's success and the result was valid.

NET-SNMP-EXTEND-MIB::nsExtendOutNumLines."mysql" = INTEGER: 165
NET-SNMP-EXTEND-MIB::nsExtendResult."mysql" = INTEGER: 0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".1 = STRING: a0:156
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".2 = STRING: a1:8
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".3 = STRING: a2:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".4 = STRING: a3:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".5 = STRING: a4:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".6 = STRING: a5:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".7 = STRING: a6:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".8 = STRING: a7:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".9 = STRING: a8:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".10 = STRING: a9:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".11 = STRING: aa:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".12 = STRING: ab:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".13 = STRING: ac:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".14 = STRING: ad:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".15 = STRING: ae:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".16 = STRING: af:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".17 = STRING: ag:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".18 = STRING: ah:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".19 = STRING: ai:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".20 = STRING: aj:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".21 = STRING: ak:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".22 = STRING: al:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".23 = STRING: am:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".24 = STRING: an:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".25 = STRING: ao:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".26 = STRING: ap:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".27 = STRING: aq:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".28 = STRING: ar:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".29 = STRING: as:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".30 = STRING: at:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".31 = STRING: au:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".32 = STRING: av:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".33 = STRING: aw:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".34 = STRING: ax:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".35 = STRING: ay:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".36 = STRING: az:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".37 = STRING: b0:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".38 = STRING: b1:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".39 = STRING: b2:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".40 = STRING: b3:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".41 = STRING: b4:8
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".42 = STRING: b5:182842
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".43 = STRING: b6:6
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".44 = STRING: b7:106
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".45 = STRING: b8:674
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".46 = STRING: b9:680
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".47 = STRING: ba:300
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".48 = STRING: bb:16364
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".49 = STRING: bc:2048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".50 = STRING: bd:9380
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".51 = STRING: be:995
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".52 = STRING: bf:13
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".53 = STRING: bg:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".54 = STRING: bh:12
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".55 = STRING: bi:1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".56 = STRING: bj:15
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".57 = STRING: bk:1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".58 = STRING: bl:151
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".59 = STRING: bm:50
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".60 = STRING: bn:68075
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".61 = STRING: bo:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".62 = STRING: bp:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".63 = STRING: bq:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".64 = STRING: br:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".65 = STRING: bs:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".66 = STRING: bt:96
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".67 = STRING: bu:14131440
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".68 = STRING: bv:251788
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".69 = STRING: bw:42454
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".70 = STRING: bx:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".71 = STRING: by:10551
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".72 = STRING: bz:1923
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".73 = STRING: c0:4317
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".74 = STRING: c1:18874368
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".75 = STRING: c2:532453
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".76 = STRING: c3:92102
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".77 = STRING: c4:10914
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".78 = STRING: c5:304821
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".79 = STRING: c6:16303
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".80 = STRING: c7:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".81 = STRING: c8:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".82 = STRING: c9:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".83 = STRING: ca:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".84 = STRING: cb:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".85 = STRING: cc:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".86 = STRING: cd:1516
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".87 = STRING: ce:7
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".88 = STRING: cf:1318
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".89 = STRING: cg:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".90 = STRING: ch:9090
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".91 = STRING: ci:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".92 = STRING: cj:1295
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".93 = STRING: ck:10277
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".94 = STRING: cl:2525
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".95 = STRING: cm:4677
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".96 = STRING: cn:915
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".97 = STRING: co:30
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".98 = STRING: cp:373738505
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".99 = STRING: cq:54329302
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".100 = STRING: cr:8388608
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".101 = STRING: cs:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".102 = STRING: ct:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".103 = STRING: cu:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".104 = STRING: cv:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".105 = STRING: cw:16777216
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".106 = STRING: cx:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".107 = STRING: cy:35981
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".108 = STRING: cz:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".109 = STRING: d0:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".110 = STRING: d1:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".111 = STRING: d2:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".112 = STRING: d3:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".113 = STRING: d4:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".114 = STRING: d5:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".115 = STRING: d6:1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".116 = STRING: d7:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".117 = STRING: d8:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".118 = STRING: d9:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".119 = STRING: da:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".120 = STRING: db:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".121 = STRING: dc:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".122 = STRING: dd:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".123 = STRING: de:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".124 = STRING: df:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".125 = STRING: dg:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".126 = STRING: dh:2
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".127 = STRING: di:420726
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".128 = STRING: dj:2885
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".129 = STRING: dk:52
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".130 = STRING: dl:257495
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".131 = STRING: dm:1472
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".132 = STRING: dn:159939
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".133 = STRING: do:160738
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".134 = STRING: dp:2431
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".135 = STRING: dq:4291
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".136 = STRING: dr:5262427
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".137 = STRING: ds:705
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".138 = STRING: dt:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".139 = STRING: du:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".140 = STRING: dv:72775
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".141 = STRING: dw:10940
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".142 = STRING: dx:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".143 = STRING: dy:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".144 = STRING: dz:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".145 = STRING: e0:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".146 = STRING: e1:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".147 = STRING: e2:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".148 = STRING: e3:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".149 = STRING: e4:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".150 = STRING: e5:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".151 = STRING: e6:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".152 = STRING: e7:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".153 = STRING: e8:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".154 = STRING: e9:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".155 = STRING: ea:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".156 = STRING: eb:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".157 = STRING: ec:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".158 = STRING: ed:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".159 = STRING: ee:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".160 = STRING: ef:-1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".161 = STRING: eg:0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".162 = STRING: eh:206848
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".163 = STRING: ei:1048576
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".164 = STRING: ej:19
NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysql".165 = STRING: ek:1

Is there any debug logs to analyze the problem(s)?

Many thanks

how to include graphs from remote host

I want to make something like:

  • remote host with monitoring tools for hardware that don't expose their values via snmp or something usual (like emc storages, hp blade online admin modules etc).
  • "import" that graphs to the "real host" in librenms, ie:
    • add the real emc storage processor in librenms (but nothing usefull is available)
    • configure remote host with naviseccli (tool from emc to get data out) and export it via snmp (if possible, if not is there another way?)
    • "import" the remote host data/graphs to the real emc storage processor under librenms.

is this doable?

zfs-linux issue for CentOS7

zfs-linux calls /usr/bin/python3 and requires python3 >= python3.5 .
However, the typical repository for python35 does not install python35 at /usr/bin/python3.

If possible change !#/usr/bin/python3 to #!/usr/bin/env python3 in zfs-linux.
Add documentation to advise recreation of override for snmpd on CentOS7 systems, e.g.:

/etc/systemd/system/snmpd.service.d/rh-python35.conf

[Service]
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/rh/rh-python35/root/usr/bin
Environment=LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64

os-updates broken on OpenSuSE Leap

snmp/os-updates.sh attempts to determine the distribution by checking for the existence of the various package managers, eg. zypper for OpenSuSE, yum for Redhat/CentOS and apt-get for Debian.

OpenSuSE Leap installs an apt-get wrapper that attempts runs the equivalent commands in zypper, but fails to do so correctly in this case.

On OpenSuSE 13.2, os-updates.sh runs the following command and gets a list of updates:

# zypper lu
S | Repository                | Name            | Current Version | Available Version | Arch
--+---------------------------+-----------------+-----------------+-------------------+-------
v | openSUSE-Leap-42.1-Update | apache2         | 2.4.16-12.1     | 2.4.16-15.1       | x86_64
v | openSUSE-Leap-42.1-Update | apache2-devel   | 2.4.16-12.1     | 2.4.16-15.1       | x86_64
v | openSUSE-Leap-42.1-Update | apache2-prefork | 2.4.16-12.1     | 2.4.16-15.1       | x86_64
v | openSUSE-Leap-42.1-Update | apache2-utils   | 2.4.16-12.1     | 2.4.16-15.1       | x86_64
v | openSUSE-Leap-42.1-Update | libtiff5        | 4.0.6-3.1       | 4.0.6-6.1         | x86_64
v | openSUSE-Leap-42.1-Update | perl            | 5.18.2-3.5      | 5.18.2-5.1        | x86_64
v | openSUSE-Leap-42.1-Update | perl-base       | 5.18.2-3.5      | 5.18.2-5.1        | x86_64

On OpenSuSE Leap, it instead does apt-get -s upgrade, which the crappy script interprets as zypper --dry-run update:

# apt-get -s upgrade
Loading repository data...
Reading installed packages...

The following 7 packages are going to be upgraded:
  apache2 apache2-devel apache2-prefork apache2-utils libtiff5 perl perl-base

7 packages to upgrade.
Overall download size: 9.2 MiB. Already cached: 0 B. After the operation, 20.1 KiB will be freed.
Continue? [y/n/? shows all options] (y):

and waits for input from a non-existent user.

This could be fixed by re-writing os-updates.sh to instead read /etc/os-release to determine the distribution and run the appropriate package manager. I believe this file should exist on any modern systemd based distribution - but may cause problems with older distros.

PHP Fatal Error

Hi,

I've got a problem with memcached plugin.

root@LibreNMS:/usr/lib/check_mk_agent/local# service nginx restart && /usr/lib/check_mk_agent/local/memcached
PHP Fatal error:  Uncaught Error: Class 'memcached' not found in /usr/lib/check_mk_agent/local/memcached:3
Stack trace:
#0 {main}
  thrown in /usr/lib/check_mk_agent/local/memcached on line 3

I use PHP 7.0 with repo dotdeb, an issue? Thanks

os-updates.sh don't show "updates" on app page

Trying to get osupdate wokring,
The script is working fin on multiple server, when running it terminal, i get the date in snmpwalk (see snip below) but it don't display a number on the app page

image

root@librenms:/opt# snmpwalk -v 2c -c HIDEME IPADRESSS .1.3.6.1.4.1.8072.1.3.2
NET-SNMP-EXTEND-MIB::nsExtendNumEntries.0 = INTEGER: 1
NET-SNMP-EXTEND-MIB::nsExtendCommand."osupdate" = STRING: /opt/librenms-agent/snmp/os-updates.sh
NET-SNMP-EXTEND-MIB::nsExtendArgs."osupdate" = STRING:
NET-SNMP-EXTEND-MIB::nsExtendInput."osupdate" = STRING:
NET-SNMP-EXTEND-MIB::nsExtendCacheTime."osupdate" = INTEGER: 5
NET-SNMP-EXTEND-MIB::nsExtendExecType."osupdate" = INTEGER: exec(1)
NET-SNMP-EXTEND-MIB::nsExtendRunType."osupdate" = INTEGER: run-on-read(1)
NET-SNMP-EXTEND-MIB::nsExtendStorage."osupdate" = INTEGER: permanent(4)
NET-SNMP-EXTEND-MIB::nsExtendStatus."osupdate" = INTEGER: active(1)
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."osupdate" = STRING: 0
NET-SNMP-EXTEND-MIB::nsExtendOutputFull."osupdate" = STRING: 0
NET-SNMP-EXTEND-MIB::nsExtendOutNumLines."osupdate" = INTEGER: 1
NET-SNMP-EXTEND-MIB::nsExtendResult."osupdate" = INTEGER: 0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."osupdate".1 = STRING: 0

got any clues ?

Alert Rules - SQL Error 1046 - Syntax Error

Dear fellow users,

We have a number of installation of LibreNMS. There work separately and update frequently. Recently a review of the librenms.log file revealed a significant number of the following SQL message.

We have started to investigate this problem . The NMS continues to poll the estate. We will aim to marry up the SQL statements which are executed against the database and update the thread.
If anyone has experienced a similar error message, please advise.
As far as we are there have been no changes to the ruleset.
Thanks,

librenms.log


[2019-10-25 15:17:44] production.ERROR: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(devices.disabled = 0 && devices.ignore = 0)")") = 1 AND ((devices.sysObjectID R' at line 1 (SQL: SELECT * FROM devices WHERE (devices.device_id = 820) AND ("(devices.status = 0 && "(devices.disabled = 0 && devices.ignore = 0)")") = 1 AND ((devices.sysObjectID REGEXP "(.1.3.6.1.4.1.43.)") && (devices.os LIKE "%3Com%")) = 1) (SQL: SELECT * FROM devices WHERE (devices.device_id = 820) AND ("(devices.status = 0 && "(devices.disabled = 0 && devices.ignore = 0)")") = 1 AND ((devices.sysObjectID REGEXP "(.1.3.6.1.4.1.43.)") && (devices.os LIKE "%3Com%")) = 1)#0 /opt/librenms/LibreNMS/Alert/AlertRules.php(64): dbFetchRows('SELECT * FROM d...', Array)

proxmox : keys on reference is experimental.....

root@stor1:/usr/lib/check_mk_agent/local# ./proxmox
keys on reference is experimental at /usr/share/perl5/PVE/API2Client.pm line 142.
<<<app-proxmox>>>
example
root@stor1:/usr/lib/check_mk_agent/local#

Scripts from documentation missing in repo

Hi all,
based on the documentation there should be some scripts for e.g. monitoring ntp-client and server but they are not in the agent-local folder and it's also not possible to enable them because there is no repository. So it looks like there is something missing or am I doing something wrong?

Best regards,
Markus

fail2ban not updating

Hi there,

i don't get fail2ban application to get updated.

i tried:

./poller.php -h host -d -r -f -m applications

and get:

[RRD Disabled]fail2banSNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -O qv -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro -t 600 udp:HOSTNAME:161 .1.3.6.1.4.1.8072.1.3.2.3.1.2.8.102.97.105.108.50.98.97.110]
"88
88
asterisk 87
sshd 1"

SQL[UPDATE applications set app_state ='UNKNOWN',timestamp =NOW() WHERE app_id = '6']
RRD[update /opt/librenms/rrd/host/app-fail2ban-6.rrd N:U:U]

any idea whats going wrong here?

==========================================================

Component Version
LibreNMS 056ddbac0549b67160a5d4ee061ff31043c0f1f1
DB Schema 186
PHP 5.6.30-0+deb8u1
MySQL 5.5.53-0+deb8u1
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2.1
==========================================================

Thanks!
Robert

unbound graph is empty

I followed every step to install agent on target unbound server, and setup on librenms server. But still no luck.
Here is :
RRDTool Output
391x607
OK u:0.07 s:0.00 r:0.07

make smart plugin work behind raid controllers

Would be nice to have it accept parameters such as -d megaraid,0 to allow it to read smart data behind LSI based controllers.

root@ubiquiti-docker:/var/cache# smartctl -d megaraid,0 -A /dev/sdc
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-4-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000e   130   130   039    Old_age   Always       -       2125765038
  5 Reallocated_Sector_Ct   0x0033   100   100   001    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       6191
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       66
 13 Read_Soft_Error_Rate    0x001e   130   100   000    Old_age   Always       -       19305634222
179 Used_Rsvd_Blk_Cnt_Tot   0x0033   100   100   010    Pre-fail  Always       -       0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0032   100   100   000    Old_age   Always       -       3216
181 Program_Fail_Cnt_Total  0x003a   100   100   000    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x003a   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       25
195 Hardware_ECC_Recovered  0x0032   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   100   100   000    Old_age   Always       -       0
201 Unknown_SSD_Attribute   0x0033   100   100   010    Pre-fail  Always       -       167906841130
202 Unknown_SSD_Attribute   0x0027   100   100   000    Pre-fail  Always       -       0
226 Unknown_SSD_Attribute   0x0032   100   100   000    Old_age   Always       -       102400
227 Unknown_SSD_Attribute   0x0032   100   100   000    Old_age   Always       -       0
228 Power-off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       3783637766
233 Media_Wearout_Indicator 0x0032   100   100   000    Old_age   Always       -       202552
245 Unknown_Attribute       0x0032   097   097   000    Old_age   Always       -       0

Memcache Missing values !!

We've recently installed librenms agent for memcached and graphs are already started to display but even the stats are there they don't look to be very useful. All important stats are missing such as , cache hits / cache miss / current connections. I can also see that executing memcached plugin from terminal provides these outputs but somehow graph of these values are missing : http://prntscr.com/b040tf .

apcUPSd values mixed up

I have succesfuly installed https://github.com/librenms/librenms-agent/blob/master/snmp/ups-apcups on my servers. The values reported in the JSON are correct.

The web interface however mixes these values up, it shows 13 for charge (should be time_remaining, shows 57,2 for charge (should be load) and shows 100 for battery_voltage (should be charge).

JSON:
{"version":1,"error":"0","data":{"time_remaining":"13.0","battery_nominal":"48.0","charge":"100.0","nominal_voltage":null,"input_voltage":"223.2","battery_voltage":"55.1","load":"57.2"},"errorString":"apcaccess exited with 0"}

Screenshot: https://images2.imgbox.com/98/ef/zlGLfywJ_o.png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.