{"action":"created","issue":{"url":"https://api.github.com/repos/librenms/librenms/issues/7754","repository_url":"https://api.github.com/repos/librenms/librenms","labels_url":"https://api.github.com/repos/librenms/librenms/issues/7754/labels{/name}","comments_url":"https://api.github.com/repos/librenms/librenms/issues/7754/comments","events_url":"https://api.github.com/repos/librenms/librenms/issues/7754/events","html_url":"https://github.com/librenms/librenms/pull/7754","id":274752092,"number":7754,"title":"Temperature","user":{"login":"kd7lxl","id":194108,"avatar_url":"https://avatars1.githubusercontent.com/u/194108?v=4","gravatar_id":"","url":"https://api.github.com/users/kd7lxl","html_url":"https://github.com/kd7lxl","followers_url":"https://api.github.com/users/kd7lxl/followers","following_url":"https://api.github.com/users/kd7lxl/following{/other_user}","gists_url":"https://api.github.com/users/kd7lxl/gists{/gist_id}","starred_url":"https://api.github.com/users/kd7lxl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kd7lxl/subscriptions","organizations_url":"https://api.github.com/users/kd7lxl/orgs","repos_url":"https://api.github.com/users/kd7lxl/repos","events_url":"https://api.github.com/users/kd7lxl/events{/privacy}","received_events_url":"https://api.github.com/users/kd7lxl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-17T04:58:36Z","updated_at":"2017-11-17T04:58:42Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/librenms/librenms/pulls/7754","html_url":"https://github.com/librenms/librenms/pull/7754","diff_url":"https://github.com/librenms/librenms/pull/7754.diff","patch_url":"https://github.com/librenms/librenms/pull/7754.patch"},"body":"DO NOT DELETE THIS TEXT\r\n\r\n#### Please note\r\n\r\n> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.\r\n\r\n- [ ] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)\r\n\r\n#### Testers\r\n\r\nIf you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`\r\n\r\nThis pull request contains two patches to improve temperature sensor discovery.\r\n\r\nOne changes the default temperature sensor limits from scaled to static. Before this patch, the default temperature sensor limits were 70% through 160% of the current value at time of discovery. At 20C this resulted in a pretty useful range of 14-32C. However, for devices in spaces with lower temperatures, 3C for example, it set default temperature limits of 2.1-4.8C. At negative temperatures, the limits flip flop! This has nothing to do with the temperature specification of the device and for values near zero it causes alert flapping. My solution is to make the defaults static (yet relative), rather than scaled, so that single digit temperatures have ranges just as broad as double digit temperatures: `$current - 10` through `$current + 20`. At a typical temperature of 20C, this is roughly equivalent to the limits set by the old scaling.\r\n\r\nThe other patch adds defaults for Mikrotik RouterOS hardware. A quick survey of Mikrotik hardware shows that most devices are rated for or close to -40C through 70C.\r\n\r\n* https://mikrotik.com/product/RB922UAGS-5HPacT-NM\r\n* https://mikrotik.com/product/RB2011UiAS-2HnD-IN\r\n* https://mikrotik.com/product/CRS125-24G-1S-IN\r\n\r\nRather than let LibreNMS choose defaults for these based on the temperature at the time of discovery, I've hardcoded the operating temperatures specified in the Mikrotik data sheets."},"comment":{"url":"https://api.github.com/repos/librenms/librenms/issues/comments/345145784","html_url":"https://github.com/librenms/librenms/pull/7754#issuecomment-345145784","issue_url":"https://api.github.com/repos/librenms/librenms/issues/7754","id":345145784,"user":{"login":"CLAassistant","id":11571300,"avatar_url":"https://avatars1.githubusercontent.com/u/11571300?v=4","gravatar_id":"","url":"https://api.github.com/users/CLAassistant","html_url":"https://github.com/CLAassistant","followers_url":"https://api.github.com/users/CLAassistant/followers","following_url":"https://api.github.com/users/CLAassistant/following{/other_user}","gists_url":"https://api.github.com/users/CLAassistant/gists{/gist_id}","starred_url":"https://api.github.com/users/CLAassistant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CLAassistant/subscriptions","organizations_url":"https://api.github.com/users/CLAassistant/orgs","repos_url":"https://api.github.com/users/CLAassistant/repos","events_url":"https://api.github.com/users/CLAassistant/events{/privacy}","received_events_url":"https://api.github.com/users/CLAassistant/received_events","type":"User","site_admin":false},"created_at":"2017-11-17T04:58:42Z","updated_at":"2017-11-17T04:58:42Z","author_association":"NONE","body":"[![CLA assistant check](https://cla-assistant.io/pull/badge/not_signed)](https://cla-assistant.io/librenms/librenms?pullRequest=7754) <br/>Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla-assistant.io/librenms/librenms?pullRequest=7754) before we can accept your contribution.<br/><sub>You have signed the CLA already but the status is still pending? Let us [recheck](https://cla-assistant.io/check/librenms/librenms?pullRequest=7754) it.</sub>"}}
{"actor":{"display_login":"CLAassistant"}}