Giter Club home page Giter Club logo

Comments (8)

powersj avatar powersj commented on June 4, 2024 2

the Cray ClusterStor E1000 Storage System.

Looking at https://support.hpe.com/hpesc/public/docDisplay?docId=sd00002916en_us&page=GUID-691BAD62-285D-41F8-952D-58054DA9E64E.html it does appears that the login sequence requires obtaining token and then using that token for additional requests. This is different than other redfish users I've seen previously.

We would need to add a new config option, something like:

## Authentication Mode
## Choose from:
##   * basic_auth - Pass username and password as basic auth params
##   * token - Obtain a token from /redfish/v1/SessionService/Sessions
# auth_mode = "basic_auth"

In addition to obtaining the token and then using it, it does seem to expire after 12 hours per the above link, so some additional work would need to be done to ensure it is not expired and if so renew/refresh/obtain a new one.

from telegraf.

srebhan avatar srebhan commented on June 4, 2024 1

@powersj maybe this is helpful: https://pkg.go.dev/github.com/stmcginnis/gofish

from telegraf.

telegraf-tiger avatar telegraf-tiger commented on June 4, 2024

Hello! I recommend posting this question in our Community Slack or Community Forums, we have a lot of talented community members there who could help answer your question more quickly. You can also learn more about Telegraf by enrolling at InfluxDB University for free!

Heads up, this issue will be automatically closed after 7 days of inactivity. Thank you!

from telegraf.

powersj avatar powersj commented on June 4, 2024

What type of system requires this auth header versus a username/password?

Additionally, what happens when you set the username/password? What error do you get?

from telegraf.

Hipska avatar Hipska commented on June 4, 2024

@powersj Conversation continued in https://influxcommunity.slack.com/archives/CH99HUH8V/p1713516740749229

from telegraf.

ManuelPrandini avatar ManuelPrandini commented on June 4, 2024

If I use redfish input plugin with this configmap:

[[inputs.redfish]]
#  ## Redfish API Base URL.
  address = "https://<IP>:<PORT>"
#
#  ## Credentials for the Redfish API. Can also use secrets.
  username = "admin"
  password = "admin"
#
#  ## System Id to collect data for in Redfish APIs.
  computer_system_id="StorageServices.USE2600011DVS00F.FileSystems.cstor-OST0002"
#
#  ## Metrics to collect
#  ## The metric collects to gather. Choose from "power" and "thermal".
#  # include_metrics = ["power", "thermal"]
#
#  ## Tag sets allow you to include redfish OData link parent data
#  ## For Example.
#  ## Thermal data is an OData link with parent Chassis which has a link of Location.
#  ## For more info see the Redfish Resource and Schema Guide at DMTFs website.
#  ## Available sets are: "chassis.location" and "chassis"
#  # include_tag_sets = ["chassis.location"]
#
#  ## Workarounds
#  ## Defines workarounds for certain hardware vendors. Choose from:
#  ## * ilo4-thermal - Do not pass 0Data-Version header to Thermal endpoint
#  # workarounds = []
#
#  ## Amount of time allowed to complete the HTTP request
#  # timeout = "5s"
#
#  ## Optional TLS Config
#  # tls_ca = "/etc/telegraf/ca.pem"
#  # tls_cert = "/etc/telegraf/cert.pem"
#  # tls_key = "/etc/telegraf/key.pem"
#  ## Use TLS but skip chain & host verification
  insecure_skip_verify = true

I got the following error: [inputs.redfish] Error in plugin: received status code 401 (Unauthorized) for address https://:, expected 200.

In my scenario I'can' configure ca.pem, cert.pem and key.pem but with a curl I have access to auth token.
The hardware used to retrieve the metrics is the Cray ClusterStor E1000 Storage System.

from telegraf.

Hipska avatar Hipska commented on June 4, 2024

Indeed, that's why I instructed @ManuelPrandini to create a Feature Request for this.

from telegraf.

ManuelPrandini avatar ManuelPrandini commented on June 4, 2024

Yes, @powersj what you say is correct. The token expires every 12 hours, then must be refreshed. Yes maybe an authentication mode with this kind of mechanism could be great!

from telegraf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.