You are not logged in.
Bonjour, je suis actuellement en stage en entreprise, on m'a confier comme tache, l'installation et l'étude des couples GLPI+OCS et GLPI+FusionInventory ( l'entreprise utilisant actuellement le premier couple).
Je travail par machines virtuelles via Putty, mes serveurs son sous Ubuntu 10.04 avec GLPI 0.83.7, sur ma première machine il y à aussi OCS 2.05 et sur la seconde FusionInventory 0.83+2.1.
Voici mon problème j'ai installer l'agent FusionInventory sur mon serveur GLPI+FusionInventory,
sudo nano /etc/apt/sources.list.d deb h..://debian.fusioninventory.org/debian/ stable main
sudo wget -O - http://debian.fusioninventory.org/debian/archive.key | apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fusioninventory-agent
sudo apt-get install libfusioninventory-agent-task-netdiscovery-perl
sudo apt-get install libfusioninventory-agent-task-snmpquery-perl
J'ai adressé cette URL sur le plugins Fusion-for-GLPI (par GLPI):h..://192.168.20.91/glpi/plugins/fusioninventory/
Puis dans /etc/fusioninventory/agent.cfg, j'ai recopier cette adresse pour renseigner le serveur et j'ai mis le no-ssl-check=1.
Voici ce que mon serveur me répond lorsque j'exécute l'agent.
sudo fusioninventory-agent
[error] No target defined, aborting
Et en mode debug:
sudo fusioninventory-agent -d --debug
[debug] FusionInventory unified agent for UNIX, Linux and MacOSX (2.2.7)
[debug] Configuration directory: /etc/fusioninventory
[debug] Data directory: /usr/share/fusioninventory
[debug] Storage directory: /var/lib/fusioninventory-agent
[debug] Lib directory: /usr/share/fusioninventory/lib
[error] No target defined, aborting
Et donc je ne retrouve aucune machine sur mon serveur GLPI.
Je débute juste dans ce que je fais, donc je suis loin d’être une bête, merci de m'aider, sans m'en vouloir si je comprend pas tout. ^^
Last edited by valgamer (2013-01-22 11:56:02)
Offline
Faudrait le contenu du fichier /etc/fusioninventory/agent.cfg
Offline
vous devez avoir un # qui traine devant l'option server du fichier de conf de l'agent fusion
Offline
Voici le fichier agent.cfg
# fusioninventory agent configuration
# all defined values match default
# all commented values are examples
#
# Target definition options
#
# send tasks results to an OCS server
#server = h..://server.domain.com/ocsinventory
# send tasks results to a FusionInventory for GLPI server
#server = h..://192.168.20.91/glpi/plugins/fusioninventory/
# write tasks results in a directory
#local = /tmp
# write tasks results on stdout
#stdout = 0
#
# Task definition options
#
# disable software deployment tasks
#no-task = deploy
#
# Target scheduling options
#
# maximum initial delay before first target, in seconds
delaytime = 3600
# maximum delay between each targets, in seconds
wait =
# do not contact the target before next scheduled time
lazy = 0
#
# Inventory task specific options
#
# do not list local printers
# no-category = printer
# allow to scan use home directories
scan-homedirs = 0
# save the inventory as HTML
html = 0
# timeout for inventory modules execution
backend-collect-timeout = 30
# always send data to server
force = 0
# mark the machine with given tag
tag =
# additional content inventory file
additional-content =
#
# Package deployment task specific options
#
# do not use peer to peer to download files
no-p2p = 0
#
# Network options
#
# proxy address, e.g: h..://user:pass@proxy:port
proxy =
# user name for server authentication
user =
# password for server authentication
password =
# path to the CA certificates directory
ca-cert-dir =
# path to the CA certificates file
ca-cert-file =
# do not check server SSL certificates
no-ssl-check = 1
# connection timeout
timeout = 180
#
# Web interface options
#
# do not use web interface
no-httpd = 0
# network interface to listen to
h..pd-ip =
# network port to list to
h..pd-port = 62354
# trust requests without authentication token
h..pd-trust = 192.168.20.91
#
# Logging options
#
# Logger backend, either Stderr, File or Syslog (Stderr)
logger = Stderr
# log file
#logfile = /var/log/fusioninventory.log
# maximum log file size
#logfile-maxsize = 0
# Syslog facility
logfacility = LOG_USER
# Use color in the console
color = 0
#
# Execution mode options
#
# run as daemon
daemon = 1
# don't fork in background
no-fork = 0
# debug mode
debug = 0
Petite question pour être sur d'avoir bien compris, sur mon serveur GLPI+FusionInventory, je n'ai pas besoin d'OCS (je demande comme dans le conf il y a OCSserveur=...).
Et merci beaucoup d'avoir répondu aussi vite.
Last edited by valgamer (2013-01-22 12:16:48)
Offline
J'ai retirer le # devant
#server = h..://192.168.20.91/glpi/plugins/fusioninventory/
et quand j’exécute l'agent je n'ai plus de message d'erreur:
administrateur@glpitest2:/etc/fusioninventory$ sudo fusioninventory-agent
administrateur@glpitest2:/etc/fusioninventory$
Mais ma machine virtuelle (serveur) ne remonte pas pour autant dans GLPI, peut être (et même surement) que je m'y prends mal, une fois l'agent lancé, la machine est sensée remonter d'elle même ou faut il faire une manip' sur GLPI?
Last edited by valgamer (2013-01-22 12:31:49)
Offline
Si t'es en mode daemon, ca peut prendre plusieurs minutes/heures avant que ca remonte
Offline
o_0 Plusieurs heures? Mais il remontera de lui même? Je n'ai pas de manip' a faire sur GLPI? Simplement lancer la commande
sudo fusioninventory-agent
sur mon serveur et hop?
Offline
wget http://127.0.0.1:62354/now
ou
lynx http://127.0.0.1:62354/now
Offline
Ok, j'ai fait le wget
administrateur@glpitest2:/etc/fusioninventory$ sudo wget h..p://127.0.0.1:62354/now
[sudo] password for administrateur:
--2013-01-22 11:43:45-- http://127.0.0.1:62354/now
Connecting to 127.0.0.1:62354... connected.
H..P request sent, awaiting response... 403 OK
2013-01-22 11:43:45 ERROR 403: OK.
Mais à quoi sert exactement cette commande? Je n'ai toujours rien sur GLPI.
Last edited by valgamer (2013-01-22 12:47:30)
Offline
Donc ça fait déjà deux heures que j'ai lancer les commandes et je n'ai toujours pas de machine dans GLPI. Une idée?
N'y a t-il pas plusieurs lignes à dé-commenter dans conf.cfg?
Edit
J'ai changer la valeur de deamon dans conf.cfg, j'ai mis 0 à la place de 1 puis j'ai exécuté. Voici ce qui c'est affiché:
administrateur@glpitest2:/etc/fusioninventory$ sudo fusioninventory-agent
[info] task WakeOnLan is not enabled
[info] task NetDiscovery is not enabled
[info] task NetInventory is not enabled
Malgré ce message qui semble légèrement embêtant la machine est remontée aussitôt dans GLPI. Seriez vous comment rendre les wakonlan, netdiscovery etc.. enabled?
Last edited by valgamer (2013-01-22 15:58:17)
Offline
Bonjour, suite à un plantage de ma VM, mon maitre de stage à décidé de me faire repartir de zero (il n'y avait pas 36 options). J'ai tout réinstaller de la même façon a priori sauf que, lorsque j’exécute fusion en débug:
[debug] Section HARDWARE has changed since last inventory
[debug] [http client] Using Compress::Zlib for compression
[debug] running task WakeOnLan
[debug] No WakeOnLan requested in the prolog
[info] task WakeOnLan is not enabled
[debug] running task NetDiscovery
[debug] No NetDiscovery requested in the prolog
[info] task NetDiscovery is not enabled
[debug] running task Deploy
[error] [http client] communication error: 404 Not Found
[debug] bad JSON: No answer from server.
[error] [http client] communication error: 404 Not Found
[debug] bad JSON: No answer from server.
et sans débug
[error] [http client] communication error: 404 Not Found
[info] task WakeOnLan is not enabled
[info] task NetDiscovery is not enabled
[error] [http client] communication error: 404 Not Found
[error] [http client] communication error: 404 Not Found
Mais mon serveur et ma machine physique sont remontées dans GLPI mais je ne peux pas faire de découverte réseau, alors que sur la dernière installation je pouvais.
Merci de bien vouloir m'accorder quelques minutes, j'en ai vraiment besoin.
Offline
Personne?
Offline
Pas assez d'infos dans les logs, mais apparement pas d'ordre du serveur pour faire de la decouverte ou de l'inventaire réseau
Offline
Et du coup, comment je dois m'y prendre pour que ça fonctionne?
Offline
Ben faut demander à votre administrateur de la plateforme web
Offline
Du coup, j'ai changé l'adresse dans GLPI: h..p://192.168.20.91/glpi/
et dans le conf h..p://192.168.20.91/glpi/plugins/fusioninventory/
et qu'en j'exécute sa ne m'affiche pas de message d'erreur.
Sauf que quand je lance une découverte réseau, elle bloque a 25% (l'agent n'est pas en démon) du coup je lance l'agent
sudo fusioninventory-agent
et voici le résultat
administrateur@glpitest2:/etc/fusioninventory$ sudo fusioninventory-agent
[sudo] password for administrateur:
[info] task ESX is not enabled
[info] Inventory saved in /tmp/glpitest2-2013-01-24-11-43-40.ocs
[info] task WakeOnLan is not enabled
[info] task NetDiscovery is not enabled
[info] task Deploy is not enabled
[info] task NetInventory is not enabled
[info] task WakeOnLan is not enabled
Use of uninitialized value in concatenation (.) or string at /usr/share/fusioninventory/lib/FusionInventory/Agent/Task/NetDiscovery.pm line 122.
Use of uninitialized value in concatenation (.) or string at /usr/share/fusioninventory/lib/FusionInventory/Agent/Task/NetDiscovery.pm line 122.
Use of uninitialized value in concatenation (.) or string at /usr/share/fusioninventory/lib/FusionInventory/Agent/Task/NetDiscovery.pm line 126.
Use of uninitialized value in concatenation (.) or string at /usr/share/fusioninventory/lib/FusionInventory/Agent/Task/NetDiscovery.pm line 126.
[error] IPv4 range not supported by Net::IP: -
[info] task NetInventory is not enabled
Merci de bien vouloir je galère vraiment la.
Offline
Bonjour, voila j'ai réussi à me dépatouiller comme je pouvais, du coup je peux faire des découvertes réseaux, l'agent qui est sur mon serveur fonctionne correctement. Le soucis est que l'agent que j'ai sur ma machine physique fonctionnait, il remontait les informations et était détecté dans GLPI comme agent. Et ce n'ait malheureusement plus le cas il n'est plus détecté dans GLPI, il ne remonte plus.
Voici l'adresse renseignée dans GLPI(plugin Fusion) h..p://192.168.20.91/glpi/
Celle sur l'agent du serveur h..p://192.168.20.91/glpi/plugins/fusioninventory/
Celle sur l'agent de la machine physique h..p://192.168.20.91/glpi/plugins/fusioninventory/
Quelqu'un aurait-il une idée d'où cela pourrait provenir et comment je pourrais le corriger? Puisque j'ai essayé d'installer l'agent sur un poste qui était dans le matériel inconnu et l'agent n'est pas pris en compte.
Offline
Donc j'ai une meilleur question, j'ai pas réussi à régler totalement mon problème, mais l'agent qui était sur un poste utilisateur remonte, donc ça me suffit, mais je ne peux pas faire d'inventaire réseau(SNMP), il me dit directement après le lancement erreur. J'ai bien ajouté la perl snmpquery, j'ai bien coché tous les modules dans les agents.
Comment faire?
Et j'ai un problème avec le daemon, la tache avance a 50% et retombe à 25%.
administrateur@glpitest2:/etc$ sudo fusioninventory-agent -D
the 'daemon-no-fork' option is deprecated, use --daemon and --no-fork options instead
[error] [http server] failed to start the HTTPD service
[info] task ESX is not enabled
Perl exited with active threads:
1 running and unjoined
0 finished and unjoined
0 running and detached
[info] Inventory saved in /tmp/glpitest2-2013-01-30-15-08-35.ocs
Perl exited with active threads:
0 running and unjoined
1 finished and unjoined
0 running and detached
[info] task WakeOnLan is not enabled
Perl exited with active threads:
0 running and unjoined
1 finished and unjoined
0 running and detached
[info] task NetDiscovery is not enabled
Perl exited with active threads:
0 running and unjoined
1 finished and unjoined
0 running and detached
[info] task Deploy is not enabled
Perl exited with active threads:
0 running and unjoined
1 finished and unjoined
0 running and detached
[info] task NetInventory is not enabled
Perl exited with active threads:
0 running and unjoined
1 finished and unjoined
0 running and detached
Perl exited with active threads:
0 running and unjoined
1 finished and unjoined
0 running and detached
Perl exited with active threads:
0 running and unjoined
1 finished and unjoined
0 running and detached
[info] task WakeOnLan is not enabled
Perl exited with active threads:
0 running and unjoined
1 finished and unjoined
0 running and detached
(in cleanup) PANIC: underlying join failed at /usr/share/fusioninventory/lib/FusionInventory/Agent/HTTP/Server.pm line 303 during global destruction.
Perl exited with active threads:
0 running and unjoined
1 finished and unjoined
0 running and detached
[info] task NetInventory is not enabled
Perl exited with active threads:
0 running and unjoined
1 finished and unjoined
0 running and detached
Merci de bien vouloir m'aider, je pédale dans le vide la.
Last edited by valgamer (2013-02-01 18:02:30)
Offline
Bonjour,
j'ai une simple question à laquelle je ne trouve pas de réponse sur le net, comment peut on modifier le lieu d'arrivé des paquets. Je m'explique, quand je déploie un paquet sur mon client (Seven) le paquet ce stocke dans
C:\Program Files (x86)\FusionInventory-Agent\var\http..__192.168.20.91_glpi_plugins_fusioninventory_\deploy\fileparts\private
Je voudrais savoir si je peux modifier ce chemin pour le stocker par exemple dans téléchargement.
Merci de me donner une réponse.
Offline
Peut être faire un raccourcis, mais pas sûr que ça marche. Après c'est lancé en root/administrateur donc faut faire attention où tu place ton lien
Offline
Bonjour,
merci pour la solution j'ai réussir à faire ce que je voulais.
Mais j'ai un autre petit soucis, je ne trouve pas les modèles SNMP qui conviennent à ce que je veux, je décide donc d'en créer et je prend la documentation qui est disponible depuis GLPI, là il est indiqué de vous envoyer un mail avec l'objet: SNMP TOOL ACCOUNT. J'ai mis l'exception dans le Firewall mais je n'ai jamais reçu de mail avec les identifiants.
Offline
Oui les créations de comptes étaient bloqués car je devait corriger quelques gros bugs, j'ai réparé cette nuit, donc les comptes seront créés demain
Offline
Très bien merci de la réponse rapide
Offline
Bonsoir, j'ai un soucis avec le déploiement, j'utilise un script vbs pour déployer l'agant Fusion par GPO. Voici le vbs:
Option Explicit
Dim versionverification, fusionarguments, uninstallocsagent, fusionsetupURL
''''' USER SETTINGS '''''
versionverification = "2.2.7-3"
fusionarguments = "/S /debug /update-firewall /server=https://support.agglo-royan.fr/glpi/plugins/fusioninventory/ /runnow"
' Depending on your needs, you can use either HTTP or Windows share
fusionsetupURL = "\\files1\echange\DSI\fusion\fusioninventory-agent_windows-i386_" & versionverification & ".exe"
' fusionsetupURL = "http://prebuilt.fusioninventory.org/stable/windows-i386/fusioninventory-agent_windows-i386_" & versionverification & ".exe"
uninstallocsagent = "yes"
''''' DO NOT EDIT BELOW '''''
Function baseName (strng)
Dim regEx, ret
Set regEx = New RegExp
regEx.Global = true
regEx.IgnoreCase = True
regEx.Pattern = ".*[/\\]([^/\\]+)$"
baseName = regEx.Replace(strng,"$1")
End Function
Function isHttp (strng)
Dim regEx, matches
Set regEx = New RegExp
regEx.Global = true
regEx.IgnoreCase = True
regEx.Pattern = "^(http(s?)).*"
If regEx.Execute(strng).count > 0 Then
isHttp = True
Else
isHttp = False
End If
Exit Function
End Function
' http://www.ericphelps.com/scripting/samples/wget/index.html
Function SaveWebBinary(strUrl) 'As Boolean
Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2
Const ForWriting = 2
Dim web, varByteArray, strData, strBuffer, lngCounter, ado
' On Error Resume Next
'Download the file with any available object
Err.Clear
Set web = Nothing
Set web = CreateObject("WinHttp.WinHttpRequest.5.1")
If web Is Nothing Then Set web = CreateObject("WinHttp.WinHttpRequest")
If web Is Nothing Then Set web = CreateObject("MSXML2.ServerXMLHTTP")
If web Is Nothing Then Set web = CreateObject("Microsoft.XMLHTTP")
web.Open "GET", strURL, False
web.Send
If Err.Number <> 0 Then
SaveWebBinary = False
Set web = Nothing
Exit Function
End If
If web.Status <> "200" Then
SaveWebBinary = False
Set web = Nothing
Exit Function
End If
varByteArray = web.ResponseBody
Set web = Nothing
'Now save the file with any available method
On Error Resume Next
Set ado = Nothing
Set ado = CreateObject("ADODB.Stream")
If ado Is Nothing Then
Set fs = CreateObject("Scripting.FileSystemObject")
Set ts = fs.OpenTextFile(baseName(strUrl), ForWriting, True)
strData = ""
strBuffer = ""
For lngCounter = 0 to UBound(varByteArray)
ts.Write Chr(255 And Ascb(Midb(varByteArray,lngCounter + 1, 1)))
Next
ts.Close
Else
ado.Type = adTypeBinary
ado.Open
ado.Write varByteArray
ado.SaveToFile CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%") & "\fusioninventory.exe", adSaveCreateOverWrite
ado.Close
End If
SaveWebBinary = True
End Function
Function removeOCS()
On error resume next
Dim OCS
' Uninstall agent ocs if is installed
' Verification on OS 32 Bits
On error resume next
OCS = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OCS Inventory Agent\UninstallString")
If err.number = 0 then
WshShell.Run "CMD.EXE /C net stop ""OCS INVENTORY SERVICE""",0,True
WshShell.Run "CMD.EXE /C """ & OCS & """ /S /NOSPLASH",0,True
WshShell.Run "CMD.EXE /C rmdir ""%ProgramFiles%\OCS Inventory Agent"" /S /Q",0,True
WshShell.Run "CMD.EXE /C rmdir ""%SystemDrive%\ocs-ng"" /S /Q",0,True
WshShell.Run "CMD.EXE /C sc delete ""OCS INVENTORY""",0,True
End If
' Verification on OS 64 Bits
On error resume next
OCS = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\OCS Inventory Agent\UninstallString")
If err.number = 0 then
WshShell.Run "CMD.EXE /C net stop ""OCS INVENTORY SERVICE""",0,True
WshShell.Run "CMD.EXE /C """ & OCS & """ /S /NOSPLASH",0,True
WshShell.Run "CMD.EXE /C rmdir ""%ProgramFiles(x86)%\OCS Inventory Agent"" /S /Q",0,True
WshShell.Run "CMD.EXE /C rmdir ""%SystemDrive%\ocs-ng"" /S /Q",0,True
WshShell.Run "CMD.EXE /C sc delete ""OCS INVENTORY""",0,True
End If
' Verification Agent V2 on 32Bit
On error resume next
OCS = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OCS Inventory NG Agent\UninstallString")
If err.number = 0 then
WshShell.Run "CMD.EXE /C net stop ""OCS INVENTORY SERVICE""",0,True
WshShell.Run "CMD.EXE /C taskkill /F /IM ocssystray.exe",0,True
WshShell.Run "CMD.EXE /C """ & OCS & """ /S /NOSPLASH",0,True
WshShell.Run "CMD.EXE /C rmdir ""%ProgramFiles%\OCS Inventory Agent"" /S /Q",0,True
WshShell.Run "CMD.EXE /C rmdir ""%SystemDrive%\ocs-ng"" /S /Q",0,True
WshShell.Run "CMD.EXE /C sc delete ""OCS INVENTORY""",0,True
End If
' Verification Agent V2 on 64Bit
On error resume next
OCS = WshShell.RegRead("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\OCS Inventory NG Agent\UninstallString")
If err.number = 0 then
WshShell.Run "CMD.EXE /C net stop ""OCS INVENTORY SERVICE""",0,True
WshShell.Run "CMD.EXE /C taskkill /F /IM ocssystray.exe",0,True
WshShell.Run "CMD.EXE /C """ & OCS & """ /S /NOSPLASH",0,True
WshShell.Run "CMD.EXE /C rmdir ""%ProgramFiles%\OCS Inventory Agent"" /S /Q",0,True
WshShell.Run "CMD.EXE /C rmdir ""%SystemDrive%\ocs-ng"" /S /Q",0,True
WshShell.Run "CMD.EXE /C sc delete ""OCS INVENTORY""",0,True
End If
End Function
Function needFusionInstall ()
Dim Fusion
' install fusion if version is different or if not installed
needFusionInstall = False
On error resume next
Fusion = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FusionInventory Agent\DisplayVersion")
If err.number = 0 Then
' Verification on OS 32 Bits
If Fusion <> versionverification Then
needFusionInstall = True
Else
needFusionInstall = False
Return
End If
Else
' Verification on OS 64 Bits
On error resume next
Fusion = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\FusionInventory Agent\DisplayVersion")
If err.number = 0 Then
If Fusion <> versionverification Then
needFusionInstall = True
End if
Else
needFusionInstall = True
End If
End If
End Function
''' MAIN
Dim WshShell
Set WshShell = Wscript.CreateObject("Wscript.shell")
If uninstallocsagent = "yes" Then
removeOCS()
End If
If needFusionInstall() Then
If (isHttp(fusionsetupURL)) Then
SaveWebBinary(fusionsetupURL)
WshShell.Run "CMD.EXE /C %TEMP%\fusioninventory.exe " & fusionarguments,0,True
Else
WshShell.Run "CMD.EXE /C """ & fusionsetupURL & """ " & fusionarguments,0,True
End If
End If
Le script ne fonctionne pas du tout ( c'est un script trouvé sur le net). Avant nous avions fait une GPO qui ne déployait pas l'agent si le poste ne (Windows 7) n'avais pas les droits d'admin, mais le déployait très bien sous XP.
Comment puis-je faire?
Merci
Offline
Vous avez mis en GPO "ordinateur"?
Si oui, \\files1 ne doit pas être un DFS, et \\files1\echange\DSI\fusion\ accessible avec un comtpe admin
Offline