Every time I run a discovery on my network I get many devices duplicated (all devices where credentials doesn't works). I have enabled "match_mac" discovery option but it doesn't work.
"match_ip" seems to solve but I have a dhcp active in this network so a match based only on the ip address is not what I need.
How to avoid duplicated devices in a dhcp network?
If your devices are not on the same physical subnet as your Open-AudIT server, Open-AudIT cannot retrieve their MAC addresses. Hence there is no MAC to match. This is why matching IP does work. I'd suggest you work on the list and get the required credentials. Without those, you will always be running uphill.
Menu -> Report -> Device -> Devices Without Credentials
Open-AudIT treats each of the "match_" config options as part of an AND statement. So, if you have both match_mac and match_ip set to YES BOTH have to match in order for a device found via Discovery to match a device already in the dB. The more match_ config items you enable (mark Yes) the more accurate your audit will be. However, as you noted, the more likely you are to create duplicate entries in the dB when one or more of the parameters don't match.