Open celya44 opened 5 years ago
Update only updates existing IP addresses, so the behavior is correct. If you want to add IP addresses that were previously unseen, you need to run the command with "discover" instead of "update" and you need to be sure that discovery is enabled for the subnet.
discovery is enabled fur this subnet in phpipam. When I run it :
root#:/opt/phpipam-agent# php /opt/phpipam-agent/index.php discover
--------------------
Error: Didn't find any address to scan!
--------------------
in database : phpipam.subnets, for the subnet I want to discover, I have :+1:
id: 744
subnet: 31xxxxxx12
mask: 26
sectionId: 1
description: FTTH AT
firewallAddressObject: NULL
vrfId: 0
masterSubnetId: 31
allowRequests: NULL
vlanId: 114
showName: 1
device: 0
permissions: {"3":"1","2":"3"}
pingSubnet: 1
discoverSubnet: 1
DNSrecursive: 0
nameserverId: 0
DNSrecords: 0
scanAgent: 3
isFolder: 0
isFull: 0
state: 2
threshold: 0
editDate: 2018-10-22 10:30:13
linked_subnet: NULL
location: 0
lastScan: 2018-10-22 10:30:01
lastDiscovery: NULL
resolveDNS: 1
customer_id: NULL
discovery is enabled fur this subnet in phpipam. When I run it :
root#:/opt/phpipam-agent# php /opt/phpipam-agent/index.php discover -------------------- Error: Didn't find any address to scan! --------------------
Rico29, I think you are seeing what we are seeing in Issue #40. This issue #46 appears to be celya44 running the agent with "update" instead of "discover". You might want to add to the #40 thread. In short, I havent found a fix for the "Didn't finad any to scan" problem yet.
phpipam-agent is trying to UPDATE new IP addresses instead of INSERTing it :
on mysql server, I see :
As the IP does not exist (it's part of a DHCP pool), shouldn't it be an INSERT instead of an UPDATE ?