Skip to content
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

Feature Request: Self service API wrong IP for Hostadresse #721

Open
tomabg opened this issue Apr 11, 2024 · 3 comments
Open

Feature Request: Self service API wrong IP for Hostadresse #721

tomabg opened this issue Apr 11, 2024 · 3 comments
Assignees
Labels
Bug There is an issue present Investigation The team is looking into the cause of the issue

Comments

@tomabg
Copy link

tomabg commented Apr 11, 2024

Hi,

we are using Icinga director self service API and the Clients may have several (virtual) IP adresses.

Currently the Physical Adress is used for the Hostadresse field.
So after Creation of a new host we need to change to the correct IP in Icinga Director

Better would be to find out the Local IP Adress from which the connection is done to Icinga Director for example like this:

PS C:\windows\system32> Get-NetTCPConnection -RemoteAddress  10.216.5.6

LocalAddress                        LocalPort RemoteAddress                       RemotePort State       AppliedSetting
------------                        --------- -------------                       ---------- -----       --------------
10.218.4.2                          51453     10.216.5.6                          443        CloseWait   Internet
10.218.4.2                          51452     10.216.5.6                          443        TimeWait


PS C:\windows\system32>

Maybe add a like if you have the same problem too.

@tomabg
Copy link
Author

tomabg commented Apr 11, 2024

or maybe a better way:

PS C:\windows\system32> (Test-NetConnection -Port 443 -ComputerName 10.216.5.6).SourceAddress.IPAddress
10.218.4.2
PS C:\windows\system32>

@LordHepipud
Copy link
Collaborator

Thank you for your issue. There is already an Icinga function available which checks the best route to the target and uses the IP-Address from this interface

Get-IcingaNetworkInterface -IP <Icinga Director address>

Based on the networking routing configuration, it should report back the correct IP.

@LordHepipud LordHepipud self-assigned this Apr 12, 2024
@LordHepipud LordHepipud added Question Further information is requested Investigation The team is looking into the cause of the issue labels Apr 12, 2024
@tomabg
Copy link
Author

tomabg commented Apr 15, 2024

the command Get-IcingaNetworkInterface returns in my case the physical adress but not the virtual adress(VPN)

PS C:\windows\system32> Get-IcingaNetworkInterface -IP 10.216.5.6 
192.168.178.32                                                                                                         

@LordHepipud LordHepipud added Bug There is an issue present and removed Question Further information is requested labels Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug There is an issue present Investigation The team is looking into the cause of the issue
Projects
None yet
Development

No branches or pull requests

2 participants