-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Metricbeat 6.0-alpha2 Vsphere module: not authenticated (auth not being reissued) #4673
Comments
thank you for reporting @alextxm, I have some questions:
I'll have a look to our client library (govmomi), perhaps the session expired and it doesn't authenticate on reconnect |
Hi @exekias, |
So I think the client library is not issuing a new Login after reconnect, we will need to confirm that and fix it |
Hi, is there any news on this ? Can i help with further testing ? |
First I tried to use iptables to block the access and it worked fine. Reconnects after I deleted the rule. Update: I was getting a nil pointer but just needed to recreate the view after reauthenticate |
@amandahla from what I see we could benefit from using Session instead of Client? It would handle keepalive and some more goodies, what do you think? https://github.com/vmware/vic/blob/master/pkg/vsphere/session/session.go#L50-L87 |
@exekias I'm just afraid if it will work on both versions (6.0/6.5) because I see here that uses finder to populate. Same thing that I had to change because of the 'datastore (or host) '*' not found' error. But I believe that it's worth to give it a try. I'll try to follow this to make changes and test. What do you think? |
Sounds good to me, I guess we can wait for that before merging #4883? |
Yes, I think it would be better. Please, can you help me with something? I made a test and now I get this:
I needed to import "github.com/vmware/vic/pkg/vsphere/session" and added to vsphere vendor. I'm not sure how to resolve this. :-( |
You can patch https://github.com/vmware/vic/blob/master/pkg/version/version.go#L56 from the vendor folder temporarily and keep going, then we can treat that issue once/if it's working. Try by changing |
Thanks @exekias I tested with both versions and it was fine. Now, when the session is deactivacte, after the keepalive time, he re-authenticates. For this commit, I changed 'version' to 'version1' in https://github.com/vmware/vic/blob/master/pkg/version/version.go#L56 Log:
|
Hi @amandahla, |
Hi all, |
I gave a try to #4883 without success :( I have another idea, what about initializing a new client on every fetch? That would be moving https://github.com/elastic/beats/blob/master/metricbeat/module/vsphere/virtualmachine/virtualmachine.go#L58 to the |
Hi all, |
Still using the PR #4883 |
I've configured the Vsphere module in metricbeat 6.0.0-alpha2 (on a Windows 2008R2 machine) and let is run for a while. Please note than my VSphere configuration requires authentication (with insecure:true).
Metricbeat gathered data for about 12+ hours then Elasticseach started being filled with metric with the error.message field populated to NotAuthenticated (error.message:NotAuthenticated).
It happened when VSphere went "offline" for a scheduled backup activity; as it got back "online" the vsphere module seems not had performed auth again and as such ES started being populated with events with the NotAuthenticated error. I'm attaching a screenshot from kibana which details the described flow.
Please note also that no error messages can be found in the metricbeat log itself.
Is there a way to have the vsphere module to perform auth again ?
The text was updated successfully, but these errors were encountered: