Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

How to use ipdiscover in a class b subnet

Hello everybody,

I installed a new server based on debian 8.6 with:

OCSInventory-Server
OCSInventory-ocsreports
UnixAgent

from https://github.com/OCSInventory-NG.

The Server works fine, but view parts of our network are based like 128.1.0.0/16 (class B) and if I scan manually with:

ocsinventory-agent --debug --backend-collect-timeout=86400 --logfile=/var/log/ocsinventory-agent-debug.log

the scan takes over two hours to be finished:

[Tue Sep 27 12:24:10 2016][debug] Scanning the 128.1.0.0 network
[Tue Sep 27 14:28:42 2016][debug] Running Ocsinventory::Agent::Backend::OS::Generic

We are interests to scan view parts of our network frequently, but with less run duration.

Now I want to set subnets in ocsinventory like:

128.1.1.x
128.1.2.x

to scan only via ipdiscover and to forbid to scan the full class B network. Is this possible? Only if the scan is finished the results would be send to the server.

Alternatively I would scan my network via nmap and generate a xml-file to store the data like:

<REQUEST>
  <CONTENT>
    <ACCOUNTINFO>
      <KEYNAME>TAG</KEYNAME>
      <KEYVALUE>OCSNG-Server</KEYVALUE>
    </ACCOUNTINFO>
    <IPDISCOVER>
      <H>
        <I>128.1.1.1</I>
        <M>d0:aa:aa:aa:aa:aa</M>
        <N>name</N>
      </H>
    </IPDISCOVER>
  </CONTENT>
  <DEVICEID>ocsng-2016-09-26-15-22-07</DEVICEID>
  <QUERY>INVENTORY</QUERY>
</REQUEST>

But how can I send the data under debian or windows client to the server?


Additional informations:

ocsinventory-agent --version
Ocsinventory unified agent for UNIX, Linux and MacOSX (2.2)

server version: the new one 2.2.1 - but I can't find any informaion on running system (log, web frontend)

Starting OCS Inventory NG Management server setup on 2016-09-21-11-29-28

Software

PHP Version :

5.6.24-0+deb8u1 (apache2handler)

Web Server :

Apache/2.4.10 (Debian)

Database Server :

(Debian) version 5.5.52-0+deb8u1

in IP Discover by (540 points)

1 Answer

0 votes
This is a minium version of a  working xml-file:

<?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <CONTENT>
    <HARDWARE>
      <CHECKSUM>513</CHECKSUM>
      <DEFAULTGATEWAY>128.1.1.254</DEFAULTGATEWAY>
      <DNS>128.1.1.1/128.1.1.2</DNS>
      <IPADDR>::1/1/128.1.1.10/</IPADDR>
      <UUID>AAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA</UUID>
    </HARDWARE>
    <IPDISCOVER>
      <H>
        <I>192.168.0.123</I>
        <M>d0:67:aa:aa:aa:aa</M>
        <N>name</N>
      </H>
    </IPDISCOVER>
  </CONTENT>
  <DEVICEID>xxxxxx</DEVICEID>
  <QUERY>INVENTORY</QUERY>
</REQUEST>

But all datas of the device <DEVICEID>xxxxxx</DEVICEID> are removed at database.

command to send xml-file: wget --header="Content-type: multipart/form-data boundary=FILEUPLOAD" --post-file nameofxmlfile.xml http://127.0.0.1/ocsinventory
by (540 points)
 
Powered by Question2Answer
...