I am attempting to use the rest api and get a hostname and it's failing. I used the command line listed on the web_api reference site more or less with the following tweaks.
curl -4 -k -u autouser:'$omePass' -v "https://checkmk.host.com/prod/check_mk/webapi.py?action=get_host&_username=autouser&_secret=$omePass&output_format=python&request_format=python" ; -d 'request={"hostname":"myserver123"}'
What does the following error mean?
{"result": "Check_MK exception: Invalid key: _username", "result_code": 1}
I am guessing it means the password was incorrect but I've double checked and reset it to make sure it's correct and even can manually login with it.
···
--
Mike Wilson
Hi Mike,
Your formatting looks good, I don't see a difference with mine (although I don't use curl, but still - same url so it looks good).
You said you can even log in using this user.
I definitely can't login using my automation user -> "Automation user rejected" (running 1.4.0p36).
Asking the obvious here: is your user set as automation user or as a normal user?
It shouldn't have a password but a secret (not really a difference, only in naming).
Arno.
···
-----Original Message-----
From: checkmk-en <checkmk-en-bounces@lists.mathias-kettner.de> On Behalf Of Mike Wilson
Sent: maandag 13 mei 2019 20:22
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Check_MK API, Invalid key: _username
I am attempting to use the rest api and get a hostname and it's failing.
I used the command line listed on the web_api reference site more or less with the following tweaks.
curl -4 -k -u autouser:'$omePass' -v
"https://checkmk.host.com/prod/check_mk/webapi.py?action=get_host&_username=autouser&_secret=$omePass&output_format=python&request_format=python" ;
-d 'request={"hostname":"myserver123"}'
What does the following error mean?
{"result": "Check_MK exception: Invalid key: _username",
"result_code": 1}
I am guessing it means the password was incorrect but I've double checked and reset it to make sure it's correct and even can manually login with it.
--
Mike Wilson
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en
velpulap
(Praveen)
May 19, 2019, 1:39pm
3
Hey Mike,
Yes as Arno said, automation user should not able to login and it should not be having password but a secret.
Please check if it is set automation user or normal user.
BR,
Praveen.
···
On Sat, May 18, 2019 at 1:36 AM Arno Wijnhoven arnow@vsnsystemen.nl wrote:
Hi Mike,
Your formatting looks good, I don’t see a difference with mine (although I don’t use curl, but still - same url so it looks good).
You said you can even log in using this user.
I definitely can’t login using my automation user → “Automation user rejected” (running 1.4.0p36).
Asking the obvious here: is your user set as automation user or as a normal user?
It shouldn’t have a password but a secret (not really a difference, only in naming).
Arno.
-----Original Message-----
From: checkmk-en checkmk-en-bounces@lists.mathias-kettner.de On Behalf Of Mike Wilson
Sent: maandag 13 mei 2019 20:22
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Check_MK API, Invalid key: _username
I am attempting to use the rest api and get a hostname and it’s failing.
I used the command line listed on the web_api reference site more or less with the following tweaks.
curl -4 -k -u autouser:‘$omePass’ -v
“https://checkmk.host.com/prod/check_mk/webapi.py?action=get_host&_username=autouser&_secret=$omePass&output_format=python&request_format=python ”
-d ‘request={“hostname”:“myserver123”}’
What does the following error mean?
{“result”: “Check_MK exception: Invalid key: _username”,
“result_code”: 1}
I am guessing it means the password was incorrect but I’ve double checked and reset it to make sure it’s correct and even can manually login with it.
–
Mike Wilson
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en
I think there is option in check mk Disable password, which prevents login using automation user.
I see issue with the evaluation of shell variable of password. It should be in quotes or bracket, depending on the shell you are using
···
On Sun, May 19, 2019 at 3:39 PM Praveen Kumar Velpula praveen.velpula@gmail.com wrote:
Hey Mike,
Yes as Arno said, automation user should not able to login and it should not be having password but a secret.
Please check if it is set automation user or normal user.
BR,
Praveen.
On Sat, May 18, 2019 at 1:36 AM Arno Wijnhoven arnow@vsnsystemen.nl wrote:
Hi Mike,
Your formatting looks good, I don’t see a difference with mine (although I don’t use curl, but still - same url so it looks good).
You said you can even log in using this user.
I definitely can’t login using my automation user → “Automation user rejected” (running 1.4.0p36).
Asking the obvious here: is your user set as automation user or as a normal user?
It shouldn’t have a password but a secret (not really a difference, only in naming).
Arno.
-----Original Message-----
From: checkmk-en checkmk-en-bounces@lists.mathias-kettner.de On Behalf Of Mike Wilson
Sent: maandag 13 mei 2019 20:22
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Check_MK API, Invalid key: _username
I am attempting to use the rest api and get a hostname and it’s failing.
I used the command line listed on the web_api reference site more or less with the following tweaks.
curl -4 -k -u autouser:‘$omePass’ -v
“https://checkmk.host.com/prod/check_mk/webapi.py?action=get_host&_username=autouser&_secret=$omePass&output_format=python&request_format=python ”
-d ‘request={“hostname”:“myserver123”}’
What does the following error mean?
{“result”: “Check_MK exception: Invalid key: _username”,
“result_code”: 1}
I am guessing it means the password was incorrect but I’ve double checked and reset it to make sure it’s correct and even can manually login with it.
–
Mike Wilson
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en