Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

467
Views
How to use Zabbix's CurlHttpRequest() in JavaScript?

I am learning Zabbix. I would like to use CurlHttpRequest() and all these functions: enter image description here

I can't find the documentation (what's going on inside). I would like to run a JavaScript script on my computer. How can I do that? I have a problem that even this simple line of code is undefined:

var req = new CurlHttpRequest();
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

While you are configuring javascript in zabbix media types, you have an option to test the script.

var response,
    json_payload,
    params = JSON.parse(value),
    wurl = params.URL,
    msg = params.Message,
    request = new CurlHttpRequest();
    
    json_payload = '{"attachments": [{"text": "' + msg + '"}] }';

    Zabbix.Log(4, '[ cURL-log ] Sending request: ');

    request.AddHeader('Content-Type: application/json');
    response = request.Post(wurl, json_payload);

    Zabbix.Log(4, '[ cURL-log ] Received response with status code ' + request.Status() + '\n' + response);

you cab use Zabbix.Log to generate logs like console.log in javascript.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!