mika-nt28 / jeedom-librenms Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://mika-nt28.github.io/Jeedom-libreNMS/.
Home Page: https://mika-nt28.github.io/Jeedom-libreNMS/.
le bouton "importer les devices" fonctionne mais génère une erreur suite a une valeur non présente dans le fichier récupéré
il faut p-e faire matcher eqType_name de jeedom avec hostname qui aura toujours qqch.
[2018-09-20 11:26:38][DEBUG] : http://192.168.3.195/api/v0/devices
[2018-09-20 11:26:38][DEBUG] : { "status": "ok", "devices": [ { "device_id": 8, "hostname": "imprimante.poluket.ovh", "sysName": "imprimante", "ip": "192.168.3.180", "community": "public", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.641.2.71107111", "sysDescr": "Lexmark MX317dn version NH63.SB.N638 kernel 3.0.0 All-N-1", "sysContact": null, "version": null, "hardware": "MX317dn", "features": null, "location": "Bureau", "os": "lexmarkprinter", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 13047006, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:09", "last_poll_attempted": null, "last_polled_timetaken": 5.41, "last_discovered_timetaken": 3.08, "last_discovered": "2018-09-20 06:33:54", "last_ping": "2018-09-20 11:25:09", "last_ping_timetaken": 0.68, "purpose": "", "type": "printer", "serial": null, "icon": "lexmark.svg", "poller_group": 0, "override_sysLocation": 1, "notes": null, "port_association_mode": 1, "max_depth": 0, "dependency_parent_id": null, "dependency_parent_hostname": null, "lat": 41.359917, "lng": -89.47422 }, { "device_id": 11, "hostname": "jeedom2.poluket.ovh", "sysName": "jeedom2", "ip": "192.168.3.196", "community": "public", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.8072.3.2.10", "sysDescr": "Linux Jeedom2 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64", "sysContact": "Me <[email protected]>", "version": "4.9.0-8-amd64", "hardware": "Generic x86 64-bit", "features": null, "location": "Sitting on the Dock of the Bay", "os": "linux", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 758537, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:11", "last_poll_attempted": null, "last_polled_timetaken": 7.94, "last_discovered_timetaken": 2.33, "last_discovered": "2018-09-20 06:33:46", "last_ping": "2018-09-20 11:25:11", "last_ping_timetaken": 7.42, "purpose": null, "type": "server", "serial": null, "icon": "linux.svg", "poller_group": 0, "override_sysLocation": 0, "notes": null, "port_association_mode": 1, "max_depth": 2, "dependency_parent_id": "2", "dependency_parent_hostname": "proxmox2.poluket.ovh", "lat": null, "lng": null }, { "device_id": 13, "hostname": "nas-110.poluket.ovh", "sysName": "nas-110", "ip": "192.168.3.200", "community": "public", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.8072.3.2.10", "sysDescr": "Linux NAS-110 2.6.32.12 #5967 Fri Nov 3 17:20:31 CST 2017 armv5tel", "sysContact": "admin@diskstation", "version": "DSM 5.2-5967", "hardware": "DS110j", "features": null, "location": "Garage", "os": "dsm", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 670699, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:10", "last_poll_attempted": null, "last_polled_timetaken": 7.54, "last_discovered_timetaken": 4.08, "last_discovered": "2018-09-20 06:33:43", "last_ping": "2018-09-20 11:25:10", "last_ping_timetaken": 3.31, "purpose": null, "type": "storage", "serial": "9CG8N00141", "icon": "synology.svg", "poller_group": 0, "override_sysLocation": 0, "notes": null, "port_association_mode": 1, "max_depth": 0, "dependency_parent_id": null, "dependency_parent_hostname": null, "lat": 38.811363, "lng": -94.893639 }, { "device_id": 3, "hostname": "nas-1513.poluket.ovh", "sysName": "nas-1513", "ip": "192.168.3.199", "community": "librenms", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.8072.3.2.10", "sysDescr": "Linux NAS-1513 3.10.105 #23739 SMP Wed Jun 20 22:40:01 CST 2018 x86_64", "sysContact": "poluket", "version": "DSM 6.2-23739", "hardware": "DS1513+", "features": null, "location": "grenier", "os": "dsm", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 670350, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:11", "last_poll_attempted": null, "last_polled_timetaken": 7.82, "last_discovered_timetaken": 2.76, "last_discovered": "2018-09-20 06:33:30", "last_ping": "2018-09-20 11:25:11", "last_ping_timetaken": 1.29, "purpose": null, "type": "storage", "serial": "1340LNN002854", "icon": "synology.svg", "poller_group": 0, "override_sysLocation": 0, "notes": null, "port_association_mode": 1, "max_depth": 0, "dependency_parent_id": null, "dependency_parent_hostname": null, "lat": 46.573215, "lng": 3.562424 }, { "device_id": 2, "hostname": "proxmox2.poluket.ovh", "sysName": "proxmox", "ip": "", "community": "librenms", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.8072.3.2.10", "sysDescr": "Linux proxmox 4.13.4-1-pve #1 SMP PVE 4.13.4-25 (Fri, 13 Oct 2017 08:59:53 +0200) x86_64", "sysContact": "Poluket", "version": "4.13.4-1-pve", "hardware": "Generic x86 64-bit", "features": null, "location": "grenier", "os": "proxmox", "status": 0, "status_reason": "icmp", "ignore": 0, "disabled": 0, "uptime": 302, "agent_uptime": 0, "last_polled": "2018-05-05 08:45:09", "last_poll_attempted": null, "last_polled_timetaken": 6.61, "last_discovered_timetaken": 2.97, "last_discovered": "2018-05-05 06:33:45", "last_ping": "2018-05-05 08:45:09", "last_ping_timetaken": 3.5, "purpose": "", "type": "server", "serial": null, "icon": "proxmox.svg", "poller_group": 0, "override_sysLocation": 0, "notes": null, "port_association_mode": 1, "max_depth": 1, "dependency_parent_id": null, "dependency_parent_hostname": null, "lat": 46.573215, "lng": 3.562424 }, { "device_id": 1, "hostname": "router.poluket.ovh", "sysName": "router.poluket.ovh", "ip": "192.168.5.250", "community": "librenms", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.12325.1.1.2.1.1", "sysDescr": "pfSense router.poluket.ovh 2.4.3-RELEASE pfSense FreeBSD 11.1-RELEASE-p10 amd64", "sysContact": null, "version": "", "hardware": "", "features": null, "location": "Grenier", "os": "pfsense", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 759320, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:11", "last_poll_attempted": null, "last_polled_timetaken": 7.64, "last_discovered_timetaken": 3.33, "last_discovered": "2018-09-20 06:33:37", "last_ping": "2018-09-20 11:25:11", "last_ping_timetaken": 2.83, "purpose": "", "type": "firewall", "serial": null, "icon": "pfsense.svg", "poller_group": 0, "override_sysLocation": 1, "notes": null, "port_association_mode": 1, "max_depth": 0, "dependency_parent_id": null, "dependency_parent_hostname": null, "lat": 46.573215, "lng": 3.562424 }, { "device_id": 12, "hostname": "switchhp.poluket.ovh", "sysName": "switchhp", "ip": "192.168.3.251", "community": "public", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.25506.11.1.167", "sysDescr": "1920-24G-PoE+ (180W) Switch Software Version 5.20.99, Release 1107
Copyright(c)2010-2015 Hewlett-Packard Development Company, L.P.", "sysContact": null, "version": "5.20.99", "hardware": "Copyright(c)2010-2015 Hewlett-Packard Development Company, L.P.", "features": "1107", "location": "Grenier", "os": "comware", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 759720, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:13", "last_poll_attempted": null, "last_polled_timetaken": 10.22, "last_discovered_timetaken": 7.25, "last_discovered": "2018-09-20 06:33:08", "last_ping": "2018-09-20 11:25:13", "last_ping_timetaken": 2.97, "purpose": "", "type": "network", "serial": "219801A08WM08B00007B", "icon": "hpe.svg", "poller_group": 0, "override_sysLocation": 1, "notes": null, "port_association_mode": 1, "max_depth": 0, "dependency_parent_id": null, "dependency_parent_hostname": null, "lat": 46.573215, "lng": 3.562424 }, { "device_id": 16, "hostname": "switchng.poluket.ovh", "sysName": "switchng", "ip": "192.168.3.252", "community": "public", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": 1, "sysObjectID": ".1.3.6.1.4.1.4526.100.4.32", "sysDescr": "GS724Tv4 ProSafe 24-port Gigabit Ethernet Smart Switch, 6.3.1.11, B1.0.0.4", "sysContact": "poluket", "version": " 6.3.1.11", "hardware": "GS724Tv4", "features": null, "location": "Garage", "os": "netgear", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 758699, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:11", "last_poll_attempted": null, "last_polled_timetaken": 7.72, "last_discovered_timetaken": 3.1, "last_discovered": "2018-09-20 06:33:33", "last_ping": "2018-09-20 11:25:11", "last_ping_timetaken": 8.13, "purpose": null, "type": "network", "serial": null, "icon": "netgear.svg", "poller_group": 0, "override_sysLocation": 0, "notes": null, "port_association_mode": 1, "max_depth": 0, "dependency_parent_id": null, "dependency_parent_hostname": null, "lat": 38.811363, "lng": -94.893639 }, { "device_id": 10, "hostname": "unifi.poluket.ovh", "sysName": "unifi", "ip": "192.168.3.194", "community": "public", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.8072.3.2.10", "sysDescr": "Linux unifi 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64", "sysContact": "Me <[email protected]>", "version": "4.9.0-5-amd64", "hardware": "Generic x86 64-bit", "features": null, "location": "Sitting on the Dock of the Bay", "os": "linux", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 758545, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:11", "last_poll_attempted": null, "last_polled_timetaken": 7.71, "last_discovered_timetaken": 2.32, "last_discovered": "2018-09-20 06:33:48", "last_ping": "2018-09-20 11:25:11", "last_ping_timetaken": 1.19, "purpose": null, "type": "server", "serial": null, "icon": "linux.svg", "poller_group": 0, "override_sysLocation": 0, "notes": null, "port_association_mode": 1, "max_depth": 2, "dependency_parent_id": "2", "dependency_parent_hostname": "proxmox2.poluket.ovh", "lat": null, "lng": null }, { "device_id": 7, "hostname": "unifi1er.poluket.ovh", "sysName": "unifi1er", "ip": "192.168.3.142", "community": "public", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.8072.3.2.10", "sysDescr": "UAP-AC-Lite 3.9.21.8191", "sysContact": "root@localhost", "version": "3.9.21.8191", "hardware": "UAP-AC-Lite", "features": null, "location": "Grenier", "os": "unifi", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 759180, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:10", "last_poll_attempted": null, "last_polled_timetaken": 7.42, "last_discovered_timetaken": 2.34, "last_discovered": "2018-09-20 06:33:39", "last_ping": "2018-09-20 11:25:10", "last_ping_timetaken": 7.81, "purpose": "", "type": "wireless", "serial": null, "icon": "ubiquiti.svg", "poller_group": 0, "override_sysLocation": 1, "notes": null, "port_association_mode": 1, "max_depth": 0, "dependency_parent_id": null, "dependency_parent_hostname": null, "lat": 46.573215, "lng": 3.562424 }, { "device_id": 15, "hostname": "unifigarage.poluket.ovh", "sysName": "unifigarage", "ip": "192.168.3.141", "community": "public", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v1", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.8072.3.2.10", "sysDescr": "UAP-AC-Lite 3.9.21.8191", "sysContact": "root@localhost", "version": "3.9.21.8191", "hardware": "UAP-AC-Lite", "features": null, "location": "Unknown", "os": "unifi", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 759180, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:09", "last_poll_attempted": null, "last_polled_timetaken": 6.16, "last_discovered_timetaken": 2.36, "last_discovered": "2018-09-20 06:33:51", "last_ping": "2018-09-20 11:25:09", "last_ping_timetaken": 1.89, "purpose": null, "type": "wireless", "serial": null, "icon": "ubiquiti.svg", "poller_group": 0, "override_sysLocation": 0, "notes": null, "port_association_mode": 1, "max_depth": 0, "dependency_parent_id": null, "dependency_parent_hostname": null, "lat": 41.62627, "lng": -79.673584 }, { "device_id": 4, "hostname": "ups.poluket.ovh", "sysName": "ups-garage", "ip": "192.168.3.209", "community": "private", "authlevel": null, "authname": null, "authpass": null, "authalgo": null, "cryptopass": null, "cryptoalgo": null, "snmpver": "v2c", "port": 161, "transport": "udp", "timeout": null, "retries": null, "snmp_disable": 0, "bgpLocalAs": null, "sysObjectID": ".1.3.6.1.4.1.318.1.3.27", "sysDescr": "APC Web/SNMP Management Card (MB:v4.0.1 PF:v5.1.7 PN:apc_hw05_aos_517.bin AF1:v5.1.7 AN1:apc_hw05_sumx_517.bin MN:AP9630 HR:05 SN: ZA1325003980 MD:06/18/2013) (Embedded PowerNet SNMP Agent SW v2.2 compatible)", "sysContact": "poluket", "version": "AOS v5.1.7 / App v5.1.7", "hardware": "Smart-UPS X 3000 UPS 07.4 / MCU 07.4 / UBL 07.4 / MBL 06.0 (ID1003)", "features": null, "location": "Grenier", "os": "apc", "status": 1, "status_reason": "", "ignore": 0, "disabled": 0, "uptime": 566107, "agent_uptime": 0, "last_polled": "2018-09-20 11:25:11", "last_poll_attempted": null, "last_polled_timetaken": 8.32, "last_discovered_timetaken": 18.59, "last_discovered": "2018-09-20 06:33:27", "last_ping": "2018-09-20 11:25:11", "last_ping_timetaken": 1.69, "purpose": "", "type": "power", "serial": "AS1322140215", "icon": "apc.svg", "poller_group": 0, "override_sysLocation": 1, "notes": null, "port_association_mode": 1, "max_depth": 0, "dependency_parent_id": null, "dependency_parent_hostname": null, "lat": 46.573215, "lng": 3.562424 } ], "count": 12 }
de plus, si le device a comme info "disabled": 1. pour moi, il faut l'ignorer et pas essayer de l'importer
Intégrer dans la dernière version a tester
Intégrer dans la dernière version a tester
Sélection dans la configuration de
Création des commandes
je viens de le mettre a jour.
bandeau rouge avec le message:
Class 'libreNMS' not found
comme le titre le dit, avoir des icones en fonction des différents type de device existants
<option value="server">{{Serveur}}</option>
<option value="network">{{Réseau}}</option>
<option value="wireless">{{Réseau sans fil}}</option>
<option value="firewall">{{Pare feu}}</option>
<option value="power">{{Alimentation}}</option>
<option value="environment">{{Environnemet}}</option>
<option value="loadbalancer">{{Equilibreur de charge}}</option>
<option value="storage">{{Disque}}</option>
<option value="printer">{{Imprimante}}</option>
<option value="appliance">{{Appliance}}</option>
<option value="collaboration">{{Collaboration}}</option>
<option value="workstation">{{Station de travail}}</option>
[2018-09-26 15:12:18][ERROR] : [MySQL] Error code : 23000 (1062). Duplicate entry '204-IPv4' for key 'unique'
Salut,
les lignes que j'ai ajouté hiers sont la pour ouvrir une nouvelle fenêtre permettant de lister toutes les info disponibles coté liblenms et proposer (par exemple via checkbox) de les créer automatiquement des commandes avec ces infos.
peux tu regarder, j'ai un problème, j'arrive a pas a remonter le nom du device jusqu'a la requête
dans librenms.class.php (ligne 77):
$result=self::Request('/api/v0/devices/'.$deviceName.'/health');
lorsqu'e je cherche a ajouter un device, je donne un nom puis j'ai cette erreur:
Type incorrect, (classe commande inexistante)libreNMSCmd
lorsque je click sur importer les device(s) dans le menu de config j'ai une erreur 401. est ce possible d'envoyer le message et la requete dans les log en mode debug pour voir ou se trpouve le problème. surement le header mal envoyé
Intégrer dans la dernière version a tester
Intégrer dans la dernière version a tester
dans les logs, j'ai cette erreur toutes les mins:
[2018-09-26 10:09:02][ERROR] : Erreur sur la fonction cron du plugin : Using $this when not in object context
[2018-09-26 10:10:01][ERROR] : Erreur sur la fonction cron du plugin : Using $this when not in object context
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.