How to grab data from website with login password

Hi all,

I would like to collect 3 data values from my pool system.

The URL is: BAYROL Webportal

I then have to login via username and password so that it shows me the 3 datapoints.

The datafeed is via this url: https://www.bayrol-poolaccess.de/webview/getdata.php?cid=7229

does anybody know if that is accomplishable?

PS: I already have a http plugin instance collecting data. can I run both in parallel?

Hi,

PS: I already have a http plugin instance collecting data. can I run both in parallel?

You can specify multiple http plugins to collect from different end points.

I then have to login via username and password so that it shows me the 3 datapoints.

You may be able to use the cookie settings in the HTTP plugin to set the login URL, username and password. This is not guaranteed to work with all endpoints as they may have some special requirements, but it may work.

  ## Optional Cookie authentication
  # cookie_auth_url = "https://localhost/authMe"
  # cookie_auth_method = "POST"
  # cookie_auth_username = "username"
  # cookie_auth_password = "pa$$word"
  # cookie_auth_headers = { Content-Type = "application/json", X-MY-HEADER = "hello" }
  # cookie_auth_body = '{"username": "user", "password": "pa$$word", "authenticate": "me"}'
  ## cookie_auth_renewal not set or set to "0" will auth once and never renew the cookie
  # cookie_auth_renewal = "5m"

Hi JPowers,

Many thanks for the explanation. I am fairly new to http. Can you help me with what I should put in the headers/body section and also in which format?
LOGIN PAGE:

When logged in this URL shows the three values:

Thanks again for helping me!
Ben

Hi,

I would start with something like this:

  cookie_auth_url = "https://www.bayrol-poolaccess.de/webview/p/login.php"
  cookie_auth_username = "YOUR USERNAME"
  cookie_auth_password = "YOUR PASSWORD"
  cookie_auth_headers = { Content-Type = "application/json"}

See what error comes back and modify it from there.

If this path does not work, you may look at using an external method GitHub - radical-squared/bayrol: Bayrol and use the Telegraf exec plugin.