{"action":"created","issue":{"url":"https://api.github.com/repos/librenms/librenms/issues/3968","repository_url":"https://api.github.com/repos/librenms/librenms","labels_url":"https://api.github.com/repos/librenms/librenms/issues/3968/labels{/name}","comments_url":"https://api.github.com/repos/librenms/librenms/issues/3968/comments","events_url":"https://api.github.com/repos/librenms/librenms/issues/3968/events","html_url":"https://github.com/librenms/librenms/issues/3968","id":169475443,"number":3968,"title":"How Add dBm Grahps To Alcatel","user":{"login":"jgaitansmk","id":20712105,"avatar_url":"https://avatars.githubusercontent.com/u/20712105?v=3","gravatar_id":"","url":"https://api.github.com/users/jgaitansmk","html_url":"https://github.com/jgaitansmk","followers_url":"https://api.github.com/users/jgaitansmk/followers","following_url":"https://api.github.com/users/jgaitansmk/following{/other_user}","gists_url":"https://api.github.com/users/jgaitansmk/gists{/gist_id}","starred_url":"https://api.github.com/users/jgaitansmk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgaitansmk/subscriptions","organizations_url":"https://api.github.com/users/jgaitansmk/orgs","repos_url":"https://api.github.com/users/jgaitansmk/repos","events_url":"https://api.github.com/users/jgaitansmk/events{/privacy}","received_events_url":"https://api.github.com/users/jgaitansmk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/librenms/librenms/labels/Question","name":"Question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-04T21:15:22Z","updated_at":"2016-08-08T22:46:13Z","closed_at":null,"body":"Hello dear team of LibreNMS,\r\nin the first place want to congratulate them on their excellent work and dedication in creating a very full tool such as LibreNMS, amazed with the platform. -\r\n\r\nTell them that I'm currently trying to create a level Optical Sensor for the Alcatel equipment, create a Script based on which you have created for Juniper but it does not work, basically create a file called alcatel.inc.php in the /opt/librenms/includes/discovery/sensors/dbm directory, as shown above use as basis the file junos.inc.php.\r\n\r\nI share the Script you believe if I made an error when creating it or if I may suggest that further step should I get the Script to work me if work me with like will share them the file for their upcoming publications. I am attentive to your comments, in advance thank you for your prompt and valuable help.\r\n\r\n---\r\n\r\nroot@LibreNMS1:/opt/librenms/includes/discovery/sensors/dbm# more alcatel.inc.php\r\n```\r\n<?php\r\n/*\r\n * LibreNMS\r\n *\r\n * This program is free software: you can redistribute it and/or modify it\r\n * under the terms of the GNU General Public License as published by the\r\n * Free Software Foundation, either version 3 of the License, or (at your\r\n * option) any later version.  Please see LICENSE.txt at the top level of\r\n * the source code distribution for details.\r\n * Formula: 10 * log10 (uWatts*0.0001)\r\n */\r\n\r\nif ($device['os'] == 'timos' || $device['os_group'] == 'Timos') {\r\n    echo 'TimOs - Alcatel';\r\n    $multiplier= 1;\r\n    $divisor = 1;\r\n    foreach ($timos_oids as $index => $entry) {\r\n        if (is_numeric($entry['tmnxDDMRxOpticalPower'])) {\r\n            $oid = '.1.3.6.1.4.1.6527.3.1.2.2.4.31.1.21.1.'.$index;\r\n            $descr = dbFetchCell('SELECT `ifDescr` FROM `ports` WHERE `ifIndex`= ? AND `device_id` = ?', array($index, $device['device_id'])) . ' R\r\nx Power';\r\n            $limit_low = 10 * log10 (($entry['tmnxDDMRxOpticalPowerLowWarning'])*0.0001);\r\n            $warn_limit_low = 10 * log10 (($entry['tmnxDDMRxOpticalPowerLowAlarm'])*0.0001);\r\n            $limit = 10 * log10 (($entry['tmnxDDMRxOpticalPowerHiWarning'])*0.0001);\r\n            $warn_limit = 10 * log10 (($entry['tmnxDDMRxOpticalPowerHiAlarm'])*0.0001);\r\n            $current = $entry['tmnxDDMRxOpticalPower'];\r\n            $entPhysicalIndex = $index;\r\n            $entPhysicalIndex_measured = 'ports';\r\n            discover_sensor($valid['sensor'], 'dbm', $device, $oid, 'rx-'.$index, 'timos', $descr, $multiplier_ten, $conversor_uWatts_to_mWatts, $c\r\nonversor_lognatural_to_log10_base, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snm\r\np', $entPhysicalIndex, $entPhysicalIndex_measured);\r\n        }\r\n\r\n                if (is_numeric($entry['tmnxDDMTxOutputPower'])) {\r\n            $oid = '.1.3.6.1.4.1.6527.3.1.2.2.4.31.1.21.1.'.$index;\r\n            $descr = dbFetchCell('SELECT `ifDescr` FROM `ports` WHERE `ifIndex`= ? AND `device_id` = ?', array($index, $device['device_id'])) . ' R\r\nx Power';\r\n            $limit_low = 10 * log10 (($entry['tmnxDDMTxOutputPowerLowWarning'])*0.0001);\r\n            $warn_limit_low = 10 * log10 (($entry['tmnxDDMTxOutputPowerLowAlarm'])*0.0001);\r\n            $limit =10 * log10 (($entry['tmnxDDMTxOutputPowerHiWarning'])*0.0001);\r\n            $warn_limit = 10 * log10 (($entry['tmnxDDMTxOutputPowerHiAlarm'])*0.0001);\r\n            $current = $entry['tmnxDDMTxOutputPower'];\r\n            $entPhysicalIndex = $index;\r\n            $entPhysicalIndex_measured = 'ports';\r\n            discover_sensor($valid['sensor'], 'dbm', $device, $oid, 'tx-'.$index, 'timos', $descr, $multiplier, $divisor, $limit_low, $warn_limit_l\r\now, $warn_limit, $limit, $current, 'snm\r\np', $entPhysicalIndex, $entPhysicalIndex_measured);\r\n        }\r\n\r\n    }\r\n\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/librenms/librenms/issues/comments/238401026","html_url":"https://github.com/librenms/librenms/issues/3968#issuecomment-238401026","issue_url":"https://api.github.com/repos/librenms/librenms/issues/3968","id":238401026,"user":{"login":"laf","id":3941142,"avatar_url":"https://avatars.githubusercontent.com/u/3941142?v=3","gravatar_id":"","url":"https://api.github.com/users/laf","html_url":"https://github.com/laf","followers_url":"https://api.github.com/users/laf/followers","following_url":"https://api.github.com/users/laf/following{/other_user}","gists_url":"https://api.github.com/users/laf/gists{/gist_id}","starred_url":"https://api.github.com/users/laf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laf/subscriptions","organizations_url":"https://api.github.com/users/laf/orgs","repos_url":"https://api.github.com/users/laf/repos","events_url":"https://api.github.com/users/laf/events{/privacy}","received_events_url":"https://api.github.com/users/laf/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T22:46:13Z","updated_at":"2016-08-08T22:46:13Z","body":"Paste your updated code on pastebin.com or similar"}}
{"actor":{"display_login":"laf"}}