You are not logged in.
Pages: 1
Hi all
Trying to deploy agents to multiple devices, of both Windows and Linux type. I want to know how to set the location in the CFG files in order for the location of the device to be pushed to the server once the agents start registering themselves on the server. At this point it feels like I am missing something, but I cannot find any information on the documentation that will tell me what the parameter name or format should be.
Then the second part, if were to install a single server with an agent on a site, to poll a bunch of network devices via SNMP/SSH and pull data from there and push it to the server, how will add the location again to these network devices when they are inventoried on the server?
Thank you for an awesome product! The functionality seems awesome, it is now just a matter of getting things configured correctly so we can get it all together.
I hope someone can help with my questions.
Cheers
Offline
Hello,
definitely this software is awesome but after 3 weeks of playing, I am almost in the same spot.
However, glpi-agent has an option
-additional-content=FILE additional inventory content file
.
Maybe it is a start in your quest. What is needed in that file or what is necessary to add/configure on the server ... this is a story for another day .
Offline
Hello,
definitely this software is awesome but after 3 weeks of playing, I am almost in the same spot.However, glpi-agent has an option
-additional-content=FILE additional inventory content file
.
Maybe it is a start in your quest. What is needed in that file or what is necessary to add/configure on the server ... this is a story for another day .
Thank you for this. Not sure if this is going to work though. I mean, Location is already a field in the asset itself (if you click on the asset in the UI there is a field for it).
My use-case for this is a network with ~30 000 devices in total, spread across ~1500 sites. I want to have an agent running on every device capable of doing so (servers, desktops, laptops etc) but also then want one server per site to pull data from devices (either via snmp or ssh) and send to the main server. If I can use the location in the agent settings, it can be managed. But I am definitely NOT updating 30 000 devices' locations by hand.
Your last remark also resonates my frustration with this product a bit. The documentation is very lacking. Some commands on the docs don't even work on the latest version of the agent. So it is a mess to try and figure out what is needed. I cannot think that people will purchase support for this product if the basic stuff is not even configurable? I cannot evaluate a product properly if all the supposed commands don't even work. 3 days you say? Try 2.5 months over here. So it is not for a lack of trying on my part.
Offline
My two cents
Good morning / Good evening everyone.
Apologies in advance, I'm using Google Translate...
The asset's location is certainly a field filled in, but in the database and only from the GLPI interface or the data injection (Data Injection plugin + CSV).
Nowhere do the documentation of the current GLPI Agent, and formerly FusionInventory, mention the possibility of reporting this location information, since it is dependent on the hierarchy defined in the database and the visibility imposed by the Entity's notion.
The " Additional Content " Agent's functionality allows, for the hardware and software inventory of a computer asset, to manually define fields contained in the GLPI Inventory_Format by completing or overriding values (for example passing the serial number and a UUID when these are missing from the hardware BIOS/UEFI - personally applied use case).
A solution, which for my part I apply, is the use of the "TAG".
If it is well built, allows during the inventory to define the import entity of the asset, by assignment rule.
I haven't tested it yet, but the same principle of assignment can apply for locations (partial content of the TAG + use of regular expression)
But, I repeat, the structure of the places in the GLPI database must be established beforehand.
Be curious... and community!
Yours faithfully
Creuser, creuser... creuser.
GLPI 10.0.16 [ Linux el 9.4 | Apache/2.4.xx | mysql 15.1 MariaDB 10.5.xx | PHP 8.3.x ] - Apache HTTPS r-proxy [ Linux el 9.4 | Apache/2.4.xx ]
GLPI Inventory 1.3.5 | Data Injection 2.13.5 | Treeview (Arborescence) 1.10.2 | Behaviors (Comportements) 2.7.3
-- Any exchange not written in French comes from an automatic translation. --
Offline
@homebrewtainy your two cents may be a solution for me.
Im not from France but I have "Paris 2" as location in GLPI database as example
and I have in glpi_agent conf
tag = irelevant_info|Paris 2|another_irelevant_info
and I assume that location is on position 2 (eg Paris 2 - use "|" as separator)
With this regex /([a-z_]+)\|([a-zA-Z0-9 ]+)\|([a-z_]+)/ I can have the location on group index 1
Now, how can I use this information "Key 1 = Paris 2" in Action rule?
In Action I chose Assign the value from regular expression option and value for field is #1 but did not work.
The rules mechanism seems to be very powerful but with very little information in documentation.
Offline
...
Now, how can I use this information "Key 1 = Paris 2" in Action rule?
In Action I chose Assign the value from regular expression option and value for field is #1 but did not work.
...
@sim72 this looks like good progress on your side! Well done!
Wouldn't the value field simply be '1' rather than '#1' ?
Offline
sim72 wrote:...
Now, how can I use this information "Key 1 = Paris 2" in Action rule?
In Action I chose Assign the value from regular expression option and value for field is #1 but did not work.
...@sim72 this looks like good progress on your side! Well done!
Wouldn't the value field simply be '1' rather than '#1' ?
Yep! with a simple "1" it pass the validation test and apparently work.
However this solution will not work as I imagined. Long story short: I think that tag must be something like
tag = irrelevant_info|5|another_irrelevant_info
instread of
tag = irrelevant_info|Paris 2|another_irrelevant_info
In this scenario, "5" is the ID for Paris 2 in database
.
In the database, lookup is made by ID not by NAME of location and the id passed to query is that "#xxx" . Eg. if in "action" I put #5 (with #) the query is
SELECT `glpi_locations`.`completename`, `glpi_locations`.`comment`, '' AS `transname`, '' AS `transcomment`, `glpi_locations`.`address`, `glpi_locations`.`town`, `glpi_locations`.`country` FROM `glpi_locations` WHERE `glpi_locations`.`id` = '5'
.
The "#" is stripped out and the number is used in "WHERE".
So I need to know the ID of location before setting the tag. Not very practical if there are many locations
Offline
Indeed not very practical. I reckon a small piece of python code **could** retrieve a list of locations and IDs, and then this script could be used to create a config for glpi agents.... That is maybe an option. Any of the GLPI devs want to throw in their answers here? This does seem like a very impractical way of setting up tens of thousands of agents with thousands of different locations.
But thank you anyway for this, I am going to give it a try and see what happens.
Offline
hanse wrote:sim72 wrote:...
Now, how can I use this information "Key 1 = Paris 2" in Action rule?
In Action I chose Assign the value from regular expression option and value for field is #1 but did not work.
...@sim72 this looks like good progress on your side! Well done!
Wouldn't the value field simply be '1' rather than '#1' ?
Yep! with a simple "1" it pass the validation test and apparently work.
However this solution will not work as I imagined. Long story short: I think that tag must be something like
tag = irrelevant_info|5|another_irrelevant_info instread of tag = irrelevant_info|Paris 2|another_irrelevant_info In this scenario, "5" is the ID for Paris 2 in database
.
In the database, lookup is made by ID not by NAME of location and the id passed to query is that "#xxx" . Eg. if in "action" I put #5 (with #) the query isSELECT `glpi_locations`.`completename`, `glpi_locations`.`comment`, '' AS `transname`, '' AS `transcomment`, `glpi_locations`.`address`, `glpi_locations`.`town`, `glpi_locations`.`country` FROM `glpi_locations` WHERE `glpi_locations`.`id` = '5'
.
The "#" is stripped out and the number is used in "WHERE".
So I need to know the ID of location before setting the tag. Not very practical if there are many locations
Will you be willing to help me figure out what I am still missing? I have done what I think you have done but even using the location ID, it seems I cannot get the location set on a device. Not sure what I am still missing. Since you explained it so well.
Cheers
Offline
Pages: 1