-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNMP-inventory error (v 1.12) only ask for an (A-record) on ipv6 only hosts #1109
Comments
Hello, could you attach how your group configuration and inventory looks like in yaml? |
Ofcause: scheduler-config.yaml: |
The ipv6 address for the device is ip or hostname? In Corefile:
.env
If you configured different than default ipv6 subnet for sc4snmp_network, the COREDNS_ADDRESS_IPv6 should be assigned from that range. docker-compose-coredns.yaml
Let me know if this solution was helpful. |
The Hostname is normally resolvable from the host, but the coredns is not asked for a AAAA record, but an : A from the worker process. When traps are coming in with a IPV6 they are easily resolved to a hostname.
.env (IP have been masked, aka copied from your example):
docker-compose-coredns.yaml:
|
The method responsible for host translation is supporting only ipv4 address resolution. That probably is main cause why only A request is sent. I will update the code with new method that will support both ipv4 and ipv6 and let you know when the new version is ready. |
Hello,
|
It seems to get a little further now, but still hits a snag:
In Coredns i see the AAAA record request now:
|
Issue require release of new version with fixed DNS for IPv6. For now the quick fix is available with using the image:
|
It run directly on DOCKER not kubernetes.
It seems we have hit a bit of an error when we a host in the inventory file which only have a ipv6 host-adress, which causes the inventory container to fail during startup, as it seems to only ask for an: A-record instead of a AAAA-record:
log from inventory container
{"message": "Group exampleipv6.com doesn't exist in the configuration. Treating exampleipv6.com as a hostname", "time": "2024-10-21T10:18:23.102008", "level": "WARNING"} {"message": "Exception raised for exampleipv6.com:161: 1 validation error for InventoryRecord\naddress\n field address must be an IP or a resolvable hostname exampleipv6.com (type=value_error)", "time": "2024-10-21T10:18:23.112384", "exc_info": "Traceback (most recent call last):\n File \"/app/.venv/lib/python3.10/site-packages/splunk_connect_for_snmp/inventory/loader.py\", line 209, in load\n ir = InventoryRecord(**new_source_record)\n File \"/app/.venv/lib/python3.10/site-packages/splunk_connect_for_snmp/common/inventory_record.py\", line 53, in __init__\n super().__init__(*args, **kwargs)\n File \"pydantic/main.py\", line 341, in pydantic.main.BaseModel.__init__\npydantic.error_wrappers.ValidationError: 1 validation error for InventoryRecord\naddress\n field address must be an IP or a resolvable hostname exampleipv6.com (type=value_error)", "level": "ERROR"}
Coredns log:
[INFO] [{src_ipv6}]:51761 - 1337 "A IN exampleipv6.com. udp 57 false 1200" NOERROR qr,rd,ra 141 0.002197727s
The text was updated successfully, but these errors were encountered: