Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Epson Projector as new OS #12928

Merged
merged 5 commits into from Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions includes/definitions/epson-projector.yaml
@@ -0,0 +1,8 @@
os: epson-projector
text: 'Epson Projector'
type: collaboration
icon: epson
group: epson
discovery:
- sysObjectID:
- .1.3.6.1.4.1.1248.4
37 changes: 37 additions & 0 deletions includes/discovery/sensors/count/epson-projector.inc.php
@@ -0,0 +1,37 @@
<?php
/*
* LibreNMS
*
* 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. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*
* @package LibreNMS
* @subpackage webui
* @link http://librenms.org
* @copyright 2018 LibreNMS
* @author LibreNMS Contributors
*/

use Illuminate\Support\Str;

if (Str::startsWith($device['sysObjectID'], '.1.3.6.1.4.1.1248.4.1')) {
discover_sensor(
$valid['sensor'],
'count',
$device,
'.1.3.6.1.4.1.1248.4.1.1.1.1.0',
0,
'epson-projector',
'Lamp Hours',
1,
1,
null,
null,
null,
null,
snmp_get($device, '.1.3.6.1.4.1.1248.4.1.1.1.1.0', '-Ovq')
);
}