Skip to content

autodiscovery use dns name in description field #6177

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

Open
zmon49 opened this issue Mar 13, 2025 · 2 comments
Open

autodiscovery use dns name in description field #6177

zmon49 opened this issue Mar 13, 2025 · 2 comments
Labels
enhancement General tag for an enhancement

Comments

@zmon49
Copy link

zmon49 commented Mar 13, 2025

Feature Request

Is your feature request related to a problem? Please describe

in previous versions of cacti, 1.2.10 specifically, auto discovery was able to discover the dns name of a device. 1.2.29 it still looks like its trying to do that, but doesn't find the DNS response in question (I am not sure if this is actually a bug, or dropped feature in recent release)
From there I was able to edit the PHP to tell it to default using the discovered dns name in the description field.

Describe the solution you'd like

Would like auto discovery to be able to find and use the DNS name of a device and use that in the description.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've
considered.

Additional context

Add any other context or screenshots about the feature request here.

@zmon49 zmon49 added the enhancement General tag for an enhancement label Mar 13, 2025
@TheWitness
Copy link
Member

Hostname right? Not host description.

@zmon49
Copy link
Author

zmon49 commented Mar 13, 2025

Description, and hostname really. but I made a separate request for hostname.
After some testing, I did figure out what's causing it not to find the DNS name.

There are 2 functions that are almost identical . this one works

function get_dns_from_ip($ip, $dns, $timeout = 1000) {

and this one doesnt.
function automation_get_dns_from_ip(string $ip, string $dns, int $timeout = 1000): string {

the auto discovery uses the non-working one by default.

The only difference seems to be the if statement that returns "return 'timed_out';" seems like the second one just always trues on that if statement. causing it to always return timed_out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General tag for an enhancement
Projects
None yet
Development

No branches or pull requests

2 participants