anthonygauthier/jmeter-elasticsearch-backend-listener

Not able to send data to ES when authentication is required

sgriffiths opened this issue ยท 8 comments

Hi,

I have been attempting to use the ES backend listener to send jmeter results. This works fine locally when xpack isnt installed.
However when using x-pack, and in my case i'm attempting to send the data to a monitoring box which exposes this data to Kibana and I cannot see a way of passing these 'basic' auth credentials.
Is this something that you could add ? Or is there a way to do this ?

Hi there,

This is definitely something I can add, I'll start looking into it first thing in the morning! I'm sure this could benefit other people as well ๐Ÿ˜„ !

Thanks for the suggestion.

Hello again @sgriffiths,

So I created a new pre-release containing the changes for the Basic authentication in XPack. If you could just test it out, that'd be great!

https://github.com/delirius325/jmeter-elasticsearch-backend-listener/releases/tag/2.4.1-SNAPSHOT

  • Simply remove the version of jmeter-elasticsearch-backend-listener that's already in your lib/ext folder
  • Replace it with the pre-release 2.4.1 JAR

Thanks!

Hi,

Thanks for that.

However I pulled down the snapshot and copied to the /lib/ext directory after having removed the previous version and Im not seeing the changes in Jmeter.

I attempted adding and removing through the plugin manager to see if that made a difference but it didnt. (plugin is showing as available/installed)

I tried to just manually enter the "es.xpack.password" and "es.xpack.user" incase they were just hidden fields at the moment.
This also did not work

Any other suggestions ?
I'm using Jmeter 4.0.2 and the plugin manager 1.2

Hello,

Although that's most likely not the main issue here, if you added and removed from the plugins manager before manually entering the "es.xpack.user" and "es.xpack.password" that's probably why it didn't work. The new version hasn't been pushed to the plugins manager yet.

As for the fields not appearing, that's just odd.. Mines are showing just fine :

screen shot 2018-07-20 at 8 19 09 am

Here's the file in my lib/ext folder:

screen shot 2018-07-20 at 8 23 47 am

All I could think of right now would be to download a fresh JMeter folder, extract it and put the JAR file into the lib/ext right away. For some reasons I feel like something's conflicting here..!

Cheers,

Hi,

I figured out what the issue was. There was another install on Jmeter that was running even when I thought I was executing a later version. All sort now though.

I was able to enter a username and password and the basic auth worked a treat
Sample results were published to ES (a monitoring box in my case):

screenshot 2018-07-20 22 52 55

And these were subsequently surfaced in Kibana:
screenshot 2018-07-20 22 51 58

Looks pretty good to me

Wonderful ๐Ÿ˜„ ! I'll be pushing this version to the Maven central repository then.

Thanks for the feedback @sgriffiths,

Hey there @sgriffiths,

Just thought I'd let you know that the version is now officially published on JMeter-Plugins. Therefore, if you want to delete the SNAPSHOT JAR from your lib/ext and install the official version, go for it ๐Ÿ˜„ !

By doing so you'll most likely avoid conflicting JAR issues when another version is released.

Again thanks a lot!

Hi

I am not sure if this is the right place for my comments - Pls advise

I have the 2.6.1 version of the jar file and got JMeter to send to ElasticSearch Rest port. However when the ES port is behind https it is not working as expected. I added the new server IP as well as username/password and ran the same jmeter test. The Jmeter console log states "ElasticSearchMetricSender: Index already exists!" and then later in the log it states:
"2019-05-20 11:41:32,967 ERROR i.g.d.j.b.e.ElasticSearchMetricSender: Exceptionjava.lang.RuntimeException
2019-05-20 11:41:32,967 ERROR i.g.d.j.b.e.ElasticSearchMetricSender: ElasticSearch Backend Listener was unable to perform request to the ElasticSearch engine. Request reached timeout."

I am not sure if I configured the es.scheme correct nor if I have to pull the selfsigned cert into JMeter

Regards
DJW