You are not logged in.
Pages: 1
Topic closed
Hello,
I would like to read, add and modify IP adresses of my computer through the API
Basically, the goal is to synchronize GLPI with data from Zabbix, which is already broadly installed is our servers.
Using webservice plugin, I manage to get computer info. I can see the MAC adresses, but no IP !
Any ideas on how to get them, and how to add some IP to a new computer ?
Thanks a lot,
Stéphane
API call:
http://{{hostname}}/glpi/plugins/webservices/rest.php?method=glpi.getObject&session={{session}}&itemtype=Computer&id=10&with_infocom=1&with_networkport=1
{
"name": "my-hostname",
"id": "10",
"locations_id": "0",
"computertypes_id": "2",
"computermodels_id": "2",
"states_id": "0",
"operatingsystems_id": "1",
"operatingsystemversions_id": "2",
"operatingsystemservicepacks_id": "0",
"autoupdatesystems_id": "0",
"operatingsystemarchitectures_id": "1",
"uuid": "421A6201-6A65-49F7-E874-C71E3D02833A",
"os_kernel_version": "3.10.0-229.el7.x86_64",
"serial": "VMware-42 1a 62 01 6a 65 49 f7-e8 74 c7 1e 3d 02 83 3a",
"otherserial": "No Asset Tag",
"contact": "root",
"users_id": "0",
"groups_id": "0",
"date_mod": "2017-07-31 15:51:43",
"date_creation": "2017-07-31 15:51:43",
"networks_id": "0",
"domains_id": "0",
"manufacturers_id": "11",
"users_id_tech": "0",
"groups_id_tech": "0",
"entities_id": "0",
"NetworkPort": {
"8": {
"name": "lo",
"id": "8",
"logical_number": "0",
"mac": "00:00:00:00:00:00",
"instantiation_type": "NetworkPortEthernet",
"itemtype": "Computer",
"items_id": "10"
},
"9": {
"name": "ens32",
"id": "9",
"logical_number": "1",
"mac": "00:50:56:9a:e8:17",
"instantiation_type": "NetworkPortEthernet",
"itemtype": "Computer",
"items_id": "10"
}
}
}
I don't see any IP adresses. However, I have some from the frontend:
Network ports Characteristics Internet information
# Name Connected to Ethernet port speed MAC IP addresses IP networks1 ens32
Not connected.
Connect 1 Gbit/s 00:50:56:9a:e8:17 10.0.27.113 10.0.0.0 / 255.255.0.0 - 10.0.0.0/255.255.0.0 - 10.0.0.10 lo
Not connected.
Connect 10 Mbit/s 00:00:00:00:00:00 127.0.0.1
Last edited by stephben (2017-08-01 09:25:32)
Offline
Hello,
I have exactly the same problem. In the following documentation it's said there is an IP key in the array returned : https://forge.glpi-project.org/projects … tworkports.
Did you find another way to get or modify IP ?
Thank you,
Offline
Not at all ..
I think in the most recent version it's quite compliquated between IP adresse, IP network and so on ...
I started to dig from the database itself ... however, it's not that simple, plenty of tables.
Offline
hi,
Same question here using GLPI 9.1.7 and web services 1.7.1 despite the fact that in the documentation it is mentioned that it should return ip address no ip address is returned could you advise please how to return the ip address?
Thanks
Oleg
Offline
this part Inventory was abandoned by the developer.
I must review all to check the problem
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Ticket opened on the forge: https://forge.glpi-project.org/issues/5556
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Corrected. You will have this correction tomorrow in the tarball: https://forge.glpi-project.org/tarballs-plugins/
If OK for you i will make a release rapidly.
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Version 1.7.1 release today
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Pages: 1
Topic closed