Quantcast
Channel: Ocsinventory Q&A - Recent questions and answers
Viewing all 11962 articles
Browse latest View live

Answered: Server 2.7 -> 2.8 only 2.7 Agents able to send


Answered: waiting notification deploy software

$
0
0
hy, i did not understand what you mean .. can you please describe in other words what you want or ask ?

Hosts increase in dash, but not in the host list.

$
0
0

I observe strange behaviour of the reported inventories from some 2.8 Windows Agents.
Some works fine, some not... There is a growing difference between the known machines in dashbord and the realy known machine in the machine list...

I had found out, that some agents get ein html 200 and started to collect inventory data, but when they send it there will result in an html 500 error...

Example:

172.17.1.134 - - [12/Nov/2020:16:32:28 +0100] "POST /ocsinventory HTTP/1.1" 200 235 "-""OCS-NG_WINDOWS_AGENT_v2.7.0.1"
172.17.1.134 - - [12/Nov/2020:16:34:08 +0100] "POST /ocsinventory HTTP/1.1" 500 527 "-""OCS-NG_WINDOWS_AGENT_v2.7.0.1"
10.242.2.15 - - [12/Nov/2020:16:34:52 +0100] "POST /ocsinventory HTTP/1.1" 200 235 "-""OCS-NG_WINDOWS_AGENT_v2.8.0.0"
10.242.2.15 - - [12/Nov/2020:16:36:15 +0100] "POST /ocsinventory HTTP/1.1" 500 527 "-""OCS-NG_WINDOWS_AGENT_v2.8.0.0"


Agent-Log:  https://dpaste.org/hYWq

Everytime when in access_log a 500 appears, then this apears in error_log:
 

DBD::mysql::db do failed: Table 'ocs.softwares' doesn't exist at /usr/local/share/perl5/5.32/Apache/Ocsinventory/Server/Inventory/Cache.pm line 77.
DBD::mysql::db do failed: Table 'ocs.softwares' doesn't exist at /usr/local/share/perl5/5.32/Apache/Ocsinventory/Server/Inventory/Cache.pm line 79.
DBD::mysql::st execute failed: Table 'ocs.softwares' doesn't exist at /usr/local/share/perl5/5.32/Apache/Ocsinventory/Server/Inventory/Update.pm line 108.

Database works well, the password(s) in config files set well, most other clients/agents can send inventory w/o problem...

How can I debug that and find out where the Data is lost???

OCS Reports from Repo for Fedora 33:

Answered: Help deploy apk on ocs android agent

$
0
0
i think it isn't possible to deploy packages to android devices

Answered: AND - OR in searches

$
0
0
i think the or and the and search is much better with glpi

or and and are often buggy in ocs-inventory

sometime and or means really an and and vice versa in ocs-inventory

prhaps you can try some tricks with de morgan's law logic

https://en.wikipedia.org/wiki/De_Morgan%27s_laws

Answered: Echec deploiement agent ocs par GPO

Answered: Does ocs inventory use winexesvc.exe in any way?

$
0
0
i don't think so

kind regards

sokatra

Answered: ocs 2.8 missing softwares sections from soap


Answered: /var/lib/ocsinventory/reports/logs not writable

$
0
0
That's marvellous, thank you pchamorro, sorted now.

Answered: Upgradig OCS Inventory NG from 2.7 to 2.8

$
0
0
Good morning !!!

Please, any news about it ?

Thanks in advance !!!

Best regards

inserting xml does not show software information

$
0
0
Ubuntu Server 18

PHP 7.1.17

Apache/2.4.27 (Ubuntu)

Hello team!

I tell you that I made an update from OCS 2.7 to 2.8 everything works perfectly.

When inserting .xml files to ocsinventory (Local Import) it displays the inventory well but

it does not show any software information.

When you manually insert a .ocs it does show the software information.

The point is that the only way I have to insert the files from another server that I had previously

It is via xml since as far as I know there is no way to export the .ocs file from the server, is there?

Thanks for your comments

V2.8, XML avec des réponses en octetstring

$
0
0

Bonjour !

Lors d'un inventaire SNMP d'une imprimante HP, j'ai observé des problèmes d'encodage des réponses SNMP dans le fichier XML envoyé au serveur ( formatage des réponses au format octetstring dans les balises XML ) et retour d'un code 500 du serveur OCS

Mon serveur ( V2.8 sur Centos 7.8 2003 ) est configuré avec le modèle d'équipement SNMP suivant :

label + OID suivant :

Imprimante HPDescription1.3.6.1.2.1.1.1.0
Imprimante HPuptime1.3.6.1.2.1.1.3.0
Imprimante HPModel Name1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.1.0
Imprimante HPSerial Number1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0Yes

Les traces ci-dessous sont issues des logs d'un agent ocs inventory V2.8 sur une Centos 7.8 2003 , version de perl  v5.16.3

La MiB HP (HP-LASERJET-COMMON-MIB.mib) est bien le répertoire "/usr/share/snmp/mibs", les droits d'accès sont OK ( similaire au autre mibs )

On peut voir que les balises XML Model Name et Serial Number sont au format OctetString et donc probablement dans le format attendu

On peut observer à la fin des log que le serveur OCS renvoie un code  "500 Internal Server Error"

Les logs :

[Fri Nov 13 22:45:38 2020][debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <CONTENT>
    <snmp_imprimante_hp>
      <Description>HP ETHERNET MULTI-ENVIRONMENT,SN:VNC3S88888,FN:8G44X2Z,SVCID:30157,PID:HP LaserJet MFP M28w</Description>
      <Model Name>01:15:57:32:47:35:35:41</Model Name>
      <Serial Number>01:15:56:4E:43:33:53:38:38:38:38:38</Serial Number>
      <uptime>8 days, 03:58:42.74</uptime>
    </snmp_imprimante_hp>
  </CONTENT>
  <DEVICEID>agentocs-2020-11-13-18-50-24</DEVICEID>
  <QUERY>SNMP</QUERY>
</REQUEST>

[Fri Nov 13 22:45:38 2020][error] Cannot establish communication : 500 Internal Server Error
[Fri Nov 13 22:45:38 2020][debug] [snmpscan] End snmp_end_handler :)
 

Proposition de modification du code des modules

j'ai testé une modification du code perl de  la configuration du paramètre "-translate" de l'objet  Net::SNMP avec la configuration suivante dans les modules SnmpScan.pm et Snmp.pm

-translate   => [-nosuchinstance => 0, -nosuchobject => 0, -octetstring => 0]

code d'origine :

-translate   => [-nosuchinstance => 0, -nosuchobject => 0, ]

voici un exemple :

                # We have an older version v2c ou v1
                ($session, $error) = Net::SNMP->session(
                    -retries     => 1 ,
                    -timeout     => 3,
                    -version     => 'snmpv'.$comm->{VERSION},
                    -hostname    => $device->{IPADDR},
                    -community   => $comm->{NAME},
                    -translate   => [-nosuchinstance => 0, -nosuchobject => 0, -octetstring => 0],
 

j'ai réalise les modifications 2 fois ( fonction snmp V1/V2 et snmp V3 ) dans les modules SnmpScan.pm et Snmp.pm

Après la modification ,le résultats est le suivant dans le fichier de log :

le formatage des réponses SNMP dans les balises XML est correcte ...Toutefois, la réponse du serveur est toujours "Cannot establish communication : 500 Internal Server"

<REQUEST>

  <CONTENT>
    <snmp_imprimante_hp>
      <Description>HP ETHERNET MULTI-ENVIRONMENT,SN:VNC3S88888,FN:8G44X2Z,SVCID:30157,PID:HP LaserJet MFP M28w</Description>
      <Model Name>W2G55A</Model Name>
      <Serial Number>VNC3S88888</Serial Number>
      <uptime>8 days, 06:06:36.83</uptime>
    </snmp_imprimante_hp>
  </CONTENT>
  <DEVICEID>agentocs-2020-11-13-18-50-24</DEVICEID>
  <QUERY>SNMP</QUERY>
</REQUEST>

[Sat Nov 14 00:53:33 2020][error] Cannot establish communication : 500 Internal Server Error
[Sat Nov 14 00:53:33 2020][debug] [snmpscan] End snmp_end_handler :

Les logs sur le serveur OCS

[Sat Nov 14 00:53:33.029221 2020] [perl:error] [pid 1837] [client 192.168.0.26:44192] \nnot well-formed (invalid token) at line 6, column 17, byte 228 at /usr/lib64/perl5/vendor_perl/XML/Parser.pm line 187.\n

Pouvez-vous regarder le problème d'encodage des réponses SNMP dans le fichier XML du client OCS et l'erreur 500 du serveur, et peut être aussi ma proposition de modification du code ! smiley

Cordialement !

comment filtrer les ordinateurs portables ?

$
0
0
Bonjour, j'aimerais savoir comment filtrer les ordinateur portables et les pc fixes dans ocsinventory ?

New Maschines appears with no data in Database

Answered: comment filtrer les ordinateurs portables ?

$
0
0
Bonjour,

Si ton inventaire est bien fait, le type dans l'onglet matériel sera "Desktop" pour un fixe et "notebook" pour un PC portable.

Cdlt

Agent Android pas n° de série

$
0
0
bonjour à tous,

Après installation de l'agent Android sur une Galaxy Tab A, l'inventaire est bien réalisé mais le n° de série ne remonte pas.(unknown) pas plus que le nom de la tablette (SM-T510-388629b30ecc7c05) ou l'adresse mac.

Du coup c'est pas très intéressant.

Est-ce qu'il y a quelque chose à faire pour corriger cela ?

Merci d'avance

How to deploy package

$
0
0
I want to deploy package via ssl. but didn't work still in waiting notification.

Someone please guide me thanks a lot

Answered: The cron_cve.php sends too many queries

$
0
0

I've the same issue. Most of the functionality is in the function "getSoftwareInformations" in /usr/share/ocsinventory-reports/ocsreports/require/cve/Cve.php.

There are two nested loops: The outer loop goes through all publisher and the inner loop through all software (from the publishers) on all computers.

Since the table "software"  has a row for each software/hardware combination (see mysql: describe software;), the loop run through for each computer/software combination.

I fixed it by adding a "DISTINCT" to the SQL query (Line 133 in Cve.php):

$sql_soft = "SELECT DISTINCT n.NAME, v.VERSION, s.NAME_ID, s.VERSION_ID

FROM software_name n LEFT JOIN software s ON s.NAME_ID = n.ID
LEFT JOIN software_version v ON v.ID = s.VERSION_ID
WHERE s.PUBLISHER_ID = %s AND s.VERSION_ID != 1";

 

I haven't tested it yet.A test with the local cve-search is in progress. The number of request are reduced and it looks like, that there only one request per software and version and not per computer on which the software is installed.

Change status

$
0
0
Hello Colleagues! I have a question / problem: Does OCS inventory show no change status? Example: suppose I need to format a computer, then it would have to be removed from inventory, right? Does ocs have this function?

Answered: problème suite à mise à jour 2.7.0.1 vers 2.8 bug?

$
0
0
Bonjour,

Même problème ici - mise à jour à la 2.8 et plus d'ordinateurs affichés - bien que les données des ordinateurs semblent remontées d'après le dashboard.

Debian 10 - 4.19.0-11.

Une idée ?

Merci !
Viewing all 11962 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>