monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem using monit with curl


From: David
Subject: Re: Problem using monit with curl
Date: Sat, 18 Jul 2020 20:15:11 +0200

is not curl or monit
that site is doing CSRF check,
probably a django site or similar? many web frameworks do that automatically
you should point the curl to the  specific IP or hostname that  the  site  is expecting

bests,
David


On Sat, 18 Jul 2020 at 16:42, Norbert Preining <norbert@preining.info> wrote:
Hi all,

I am trying to control a few operations (read write) via curl.
Unfortunately, the simple approach
        curl -u user:pass -s 'http://localhost:NNNN/myservice' --data 'action=""> (monit http is running on port NNNN) finished with
        Invalid CSRF Token

A bit of search brought me to
        https://mmonit.com/documentation/http-api/Examples/cURL
which seems exactely what I want to do, alas, the very first invocation
given
        curl -c ~/.mmonit/cookie http://localhost:NNNN/index.csp
or
        curl -c ~/.mmonit/cookie http://127.0.0.1:NNNN/index.csp
ended with
        There is no service named "index.csp"
Even adding the -u user:pass didn't help at all.

Could someone please explain how to set up read/write access to monit
via curl? It seems that the wiki page/documentation is incorrect.

Thanks

Norbert

--
PREINING Norbert                              https://www.preining.info
Accelia Inc. + IFMGA ProGuide + TU Wien + JAIST + TeX Live + Debian Dev
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13


reply via email to

[Prev in Thread] Current Thread [Next in Thread]