[Check_mk (english)] Use a URL to login with automation user...working for anyone?

Hi all,

I have a check_mk site running with a few users using the default web password authorization. I am also using GeekTool on MacOS, which allows you to plaster web content directly onto your desktop, much like Active Desktop on Windows. I want to display a view from my Check_mk site inside one of these GeekTool regions on my desktop, but Geektool only accepts a URL, and doesn’t offer any interaction for entering a credential. I see in the Check_mk documentation that I should be able supply GeekTool with a URL that contains login credentials for the “automation” user. Like so:
http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle

But if I paste that URL into the GeekTool, the window just returns the password login dialog as if it didn’t see or accept the secret. Trying the same URL in a browser for a better look reveals that I am redirected to login.py

http://my.host.com/vy/check_mk/login.py?_origtarget=dashboard_dashlet.py?id%3D3%26mtime%3D0%26name%3Dmain

In the apache access log I find:
IP.IP.IP.IP - - [12/Nov/2017:21:48:07 -0500] "GET /vy/check_mk/login.py?_origtarget=dashboard_dashlet.py?id%3d2%26mtime%3d0%26name%3dmain HTTP/1.1" 200 2027 "http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:56.0) Gecko/20100101 Firefox/56.0”

So it’s redirecting from dashboard.py back to login.py for some reason instead of displaying a useful page.
I don’t need dashboard specifically, I just want to get past this authentication issue.
Is there something obvious I’m missing?

Thanks,
Dan

Hi Dan,

I think I did something like that once, so I'm pretty sure it should work.

Does your automation user have the correct permissions to view the dashboard?

Regards,

Evy

···

On 2017-11-13 03:53, M. Daguerre (iWoodsman) wrote:

Hi all,

I have a check_mk site running with a few users using the default web
password authorization. I am also using GeekTool on MacOS, which
allows you to plaster web content directly onto your desktop, much
like Active Desktop on Windows. I want to display a view from my
Check_mk site inside one of these GeekTool regions on my desktop, but
Geektool only accepts a URL, and doesn’t offer any interaction for
entering a credential. I see in the Check_mk documentation that I
should be able supply GeekTool with a URL that contains login
credentials for the “automation” user. Like so:
http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle

But if I paste that URL into the GeekTool, the window just returns the
password login dialog as if it didn’t see or accept the secret. Trying
the same URL in a browser for a better look reveals that I am
redirected to login.py

http://my.host.com/vy/check_mk/login.py?_origtarget=dashboard_dashlet.py?id%3D3%26mtime%3D0%26name%3Dmain

In the apache access log I find:
IP.IP.IP.IP - - [12/Nov/2017:21:48:07 -0500] "GET
/vy/check_mk/login.py?_origtarget=dashboard_dashlet.py?id%3d2%26mtime%3d0%26name%3dmain
HTTP/1.1" 200 2027
"http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle"
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:56.0) Gecko/20100101
Firefox/56.0”

So it’s redirecting from dashboard.py back to login.py for some reason
instead of displaying a useful page.
I don’t need dashboard specifically, I just want to get past this
authentication issue.
Is there something obvious I’m missing?

Thanks,
Dan

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

My automation user came preconfigured with check_mk_raw, and has administrator permissions.
I found that my URL works using curl:

curl "http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle”

returns lots of data values, implying I got past authentication. But when I hit that URL using GeekTool, I get the pretty check_mk login dialog. In some variants of my URL to try and hit pages behind authorization, I momentarily see a view starting to form but am then snapped back to the login dialog. I even tried turning off basic authentication altogether, but it remained.

One mysterious thing that may not be meaningful is if I hit:
http://my.host.com/vy/check_mk/automation.py?_username=automation&_secret=arglebargle
Note the automation.py, which is something I saw in documentation somewhere, I get an error page with "Missing secret for automation command.”
Which is odd because that secret is in its auth.secret file among the other user files for the automation user. All created at install time.
I don’t know.

···

On Nov 13, 2017, at 2:15 AM, Evy Bongers <lists+check-mk@evybongers.nl> wrote:

Hi Dan,

I think I did something like that once, so I'm pretty sure it should work.

Does your automation user have the correct permissions to view the dashboard?

Regards,

Evy

On 2017-11-13 03:53, M. Daguerre (iWoodsman) wrote:

Hi all,
I have a check_mk site running with a few users using the default web
password authorization. I am also using GeekTool on MacOS, which
allows you to plaster web content directly onto your desktop, much
like Active Desktop on Windows. I want to display a view from my
Check_mk site inside one of these GeekTool regions on my desktop, but
Geektool only accepts a URL, and doesn’t offer any interaction for
entering a credential. I see in the Check_mk documentation that I
should be able supply GeekTool with a URL that contains login
credentials for the “automation” user. Like so:
http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle
But if I paste that URL into the GeekTool, the window just returns the
password login dialog as if it didn’t see or accept the secret. Trying
the same URL in a browser for a better look reveals that I am
redirected to login.py
http://my.host.com/vy/check_mk/login.py?_origtarget=dashboard_dashlet.py?id%3D3%26mtime%3D0%26name%3Dmain
In the apache access log I find:
IP.IP.IP.IP - - [12/Nov/2017:21:48:07 -0500] "GET
/vy/check_mk/login.py?_origtarget=dashboard_dashlet.py?id%3d2%26mtime%3d0%26name%3dmain
HTTP/1.1" 200 2027
"http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle&quot;
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:56.0) Gecko/20100101
Firefox/56.0”
So it’s redirecting from dashboard.py back to login.py for some reason
instead of displaying a useful page.
I don’t need dashboard specifically, I just want to get past this
authentication issue.
Is there something obvious I’m missing?
Thanks,
Dan
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Hi Dan,

with automation user you cannot use dashboards. It is only to access views. The problem with dashboards is that your automation user is opening the dashboard but all dashlets are extra views and the dashboard by itself don’t know anything about the automation user and tries to fetch the dashlets with the not existing user/cookie.

If you want a dashboard on a big screen and opening without user interaction, i use a form fill plugin for firefox and a normal guest user account.

br

Andreas

···

M. Daguerre (iWoodsman) daguerre.m@gmail.com schrieb am Di., 14. Nov. 2017 um 03:01 Uhr: > My automation user came preconfigured with check_mk_raw, and has administrator permissions. > > I found that my URL works using curl:

curl "http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle

returns lots of data values, implying I got past authentication. But when I hit that URL using GeekTool, I get the pretty check_mk login dialog. In some variants of my URL to try and hit pages behind authorization, I momentarily see a view starting to form but am then snapped back to the login dialog. I even tried turning off basic authentication altogether, but it remained.

One mysterious thing that may not be meaningful is if I hit:

http://my.host.com/vy/check_mk/automation.py?_username=automation&_secret=arglebargle

Note the automation.py, which is something I saw in documentation somewhere, I get an error page with "Missing secret for automation command.”

Which is odd because that secret is in its auth.secret file among the other user files for the automation user. All created at install time.

I don’t know.

On Nov 13, 2017, at 2:15 AM, Evy Bongers lists+check-mk@evybongers.nl wrote:

Hi Dan,

I think I did something like that once, so I’m pretty sure it should work.

Does your automation user have the correct permissions to view the dashboard?

Regards,

Evy

On 2017-11-13 03:53, M. Daguerre (iWoodsman) wrote:

Hi all,

I have a check_mk site running with a few users using the default web

password authorization. I am also using GeekTool on MacOS, which

allows you to plaster web content directly onto your desktop, much

like Active Desktop on Windows. I want to display a view from my

Check_mk site inside one of these GeekTool regions on my desktop, but

Geektool only accepts a URL, and doesn’t offer any interaction for

entering a credential. I see in the Check_mk documentation that I

should be able supply GeekTool with a URL that contains login

credentials for the “automation” user. Like so:

http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle

But if I paste that URL into the GeekTool, the window just returns the

password login dialog as if it didn’t see or accept the secret. Trying

the same URL in a browser for a better look reveals that I am

redirected to login.py

http://my.host.com/vy/check_mk/login.py?_origtarget=dashboard_dashlet.py?id%3d3%26mtime%3d0%26name%3dmain

In the apache access log I find:

IP.IP.IP.IP - - [12/Nov/2017:21:48:07 -0500] "GET

/vy/check_mk/login.py?_origtarget=dashboard_dashlet.py?id%3d2%26mtime%3d0%26name%3dmain

HTTP/1.1" 200 2027

http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle

"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:56.0) Gecko/20100101

Firefox/56.0”

So it’s redirecting from dashboard.py back to login.py for some reason

instead of displaying a useful page.

I don’t need dashboard specifically, I just want to get past this

authentication issue.

Is there something obvious I’m missing?

Thanks,

Dan


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

That bit of wisdom (using views.py with a &view_name=XXX variable) fixed it instantly, and I am grateful!
Now I have the hostsbygroup view, updating as part of my desktop. It’s read-only, but I can see to open the website as needed.

Dan

···

On Nov 14, 2017, at 4:54 AM, Andreas Döhler <andreas.doehler@gmail.com> wrote:

Hi Dan,

with automation user you cannot use dashboards. It is only to access views. The problem with dashboards is that your automation user is opening the dashboard but all dashlets are extra views and the dashboard by itself don't know anything about the automation user and tries to fetch the dashlets with the not existing user/cookie.

If you want a dashboard on a big screen and opening without user interaction, i use a form fill plugin for firefox and a normal guest user account.

br
Andreas

M. Daguerre (iWoodsman) <daguerre.m@gmail.com> schrieb am Di., 14. Nov. 2017 um 03:01 Uhr: > My automation user came preconfigured with check_mk_raw, and has administrator permissions. > I found that my URL works using curl:

curl "http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle”

returns lots of data values, implying I got past authentication. But when I hit that URL using GeekTool, I get the pretty check_mk login dialog. In some variants of my URL to try and hit pages behind authorization, I momentarily see a view starting to form but am then snapped back to the login dialog. I even tried turning off basic authentication altogether, but it remained.

One mysterious thing that may not be meaningful is if I hit:
http://my.host.com/vy/check_mk/automation.py?_username=automation&_secret=arglebargle
Note the automation.py, which is something I saw in documentation somewhere, I get an error page with "Missing secret for automation command.”
Which is odd because that secret is in its auth.secret file among the other user files for the automation user. All created at install time.
I don’t know.

> On Nov 13, 2017, at 2:15 AM, Evy Bongers <lists+check-mk@evybongers.nl> wrote:
>
> Hi Dan,
>
> I think I did something like that once, so I'm pretty sure it should work.
>
> Does your automation user have the correct permissions to view the dashboard?
>
> Regards,
>
> Evy
>
> On 2017-11-13 03:53, M. Daguerre (iWoodsman) wrote:
>> Hi all,
>> I have a check_mk site running with a few users using the default web
>> password authorization. I am also using GeekTool on MacOS, which
>> allows you to plaster web content directly onto your desktop, much
>> like Active Desktop on Windows. I want to display a view from my
>> Check_mk site inside one of these GeekTool regions on my desktop, but
>> Geektool only accepts a URL, and doesn’t offer any interaction for
>> entering a credential. I see in the Check_mk documentation that I
>> should be able supply GeekTool with a URL that contains login
>> credentials for the “automation” user. Like so:
>> http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle
>> But if I paste that URL into the GeekTool, the window just returns the
>> password login dialog as if it didn’t see or accept the secret. Trying
>> the same URL in a browser for a better look reveals that I am
>> redirected to login.py
>> http://my.host.com/vy/check_mk/login.py?_origtarget=dashboard_dashlet.py?id%3D3%26mtime%3D0%26name%3Dmain
>> In the apache access log I find:
>> IP.IP.IP.IP - - [12/Nov/2017:21:48:07 -0500] "GET
>> /vy/check_mk/login.py?_origtarget=dashboard_dashlet.py?id%3d2%26mtime%3d0%26name%3dmain
>> HTTP/1.1" 200 2027
>> "http://my.host.com/vy/check_mk/dashboard.py?_username=automation&_secret=arglebargle&quot;
>> "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:56.0) Gecko/20100101
>> Firefox/56.0”
>> So it’s redirecting from dashboard.py back to login.py for some reason
>> instead of displaying a useful page.
>> I don’t need dashboard specifically, I just want to get past this
>> authentication issue.
>> Is there something obvious I’m missing?
>> Thanks,
>> Dan
>> _______________________________________________
>> checkmk-en mailing list
>> checkmk-en@lists.mathias-kettner.de
>> http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
>

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en