Logo
Explore Help
Sign In
mirror/librenms-librenms
1
0
Fork 0
You've already forked librenms-librenms
mirror of https://github.com/librenms/librenms.git synced 2024-10-07 16:52:45 +00:00
Code Issues Actions Packages Projects Releases Wiki Activity
Files
ee8297df198cdabe8c6f01ff9d90ae53f6e463cc
librenms-librenms/includes/snmptrap.inc.php

17 lines
351 B
PHP
Raw Normal View History

Fixed snmptraps. (#8898) * Fixed snmptraps. * Fixed space * Added bgp down/up and authentication failure * Fixed typo * Fixed some typos, arrays, astext and format_hostname * Updated documentation * Moved code to a function * Some refactor * Minor fixes * Minor fixes 2 * More minor fixes * Changes requested by Tony * Minor fixes * Moved include to snmptrap.php * Refactor traps to use object oriented code. Should trigger events too/instead, but we'll leave that. Testing todo * Add tests and fix things so they actually work Not checking events yet. * Fixed typo and severity level * Update composer deps, I think the lock file wasn't right. add json and mbstring extension deps while I'm at it. * Fix several issues with phpunit fixtures
2018-08-11 23:37:45 +02:00
<?php
use LibreNMS\Config;
function process_trap($device, $entry)
{
$oid = trim(strstr($entry[3], " "));
$oid = str_replace("::", "", strstr($oid, "::"));
$file = Config::get('install_dir').'/includes/snmptrap/'.$oid.'.inc.php';
if (is_file($file)) {
include $file;
} else {
echo "unknown trap ($file)";
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Page: 1104ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API