Open donnymgarcia opened 8 years ago
We upgraded to the latest opscenter 5.2.4 and still see the above issue.
Hi @donnymgarcia
Thanks for raising this.
That plugin does the equivalent of a curl -u
rather than a curl -d
which implicitly does a POST instead of a GET.
Does curl -u user:password...
work?
Ok so I see the problem, opscenter authentication isn't normally enabled and it requires a post login to get a session id token first.
This will require significant changes so it's going to take a while as I'm working on other things and am not currently focusing on Cassandra (although I will return it to before too long).
Thanks @HariSekhon for responding! Looking forward to when the enhancement is in place. I've been using the checkcassandra* plugins with great result. Would love to put in place the check_datastax_opscentercassandra* plugins for more visibility.
Any chance you'll get to this soon?
Schedule is full but I should be able to look at this again within 3 weeks
Hi,
Trying to use check_datastax_opscentercassandra* scripts with opscenter 5.1.3, but receiving auth error "401 Unauthorized". I've confirmed the username/password are correct with curl:
# curl -X POST -d '{"username":"#####","password":"#############"}' 'http://x.x.x.x:8888/login' {"sessionid": "3052f0a4e13c22673f9b7f68e7124517"}
`# ./check_datastax_opscenter_cassandra_bestpractice.pl --host x.x.x.x --user '#####' --password '#############' --list-clusters -vvv verbose mode on
check_datastax_opscenter_cassandra_bestpractice.pl version 0.2 => Hari Sekhon Utils version 1.17.9
host: x.x.x.x port: 8888 user: ##### password:
run now: false
setting timeout to 10 secs
setting http per request timeout to 9.00 secs
querying DataStax OpsCenter HTTP GET http://x.x.x.x:8888/cluster-configs (basic authentication) returned HTML:
{"message": "You must be logged in for this operation", "type": "Unauthorized"}
http status code: 401 http status message: Unauthorized
CRITICAL: 401 Unauthorized. Message: You must be logged in for this operation`
Any idea?
Thanks in advance.