Ad Widget

Collapse

Why does 'url' not exist when creating a web scenario step?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sandra
    Junior Member
    • Jun 2020
    • 10

    #1

    Why does 'url' not exist when creating a web scenario step?

    Dear all =)

    If I do

    Code:
    [FONT=Courier New]const web = await zabbix.request('httptest.create', {
    name: "myWebTest",
    hostid: h,
    delay: "2m",
    retries: "10",
    steps: [{
    name: "myWS1",
    // url: 'http://zabbix.com',
    // status_codes: "200",
    no: 0
    }]
    })
    console.log("Created Web Scenario: ")
    console.log(web)[/FONT]
    then I get

    Code:
    [FONT=Courier New]{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Invalid parameter \"/1/steps/1\": the parameter \"url\" is missing."},"id":"0.89685755052027"}[/FONT]
    Notice "url is missing. If I add that,

    Code:
    [FONT=Courier New]const web = await zabbix.request('httptest.create', {
    name: "myWebTest",
    hostid: h,
    delay: "2m",
    retries: "10",
    steps: [{
    name: "myWS1",
    url: 'http://zabbix.com',
    // status_codes: "200",
    no: 0
    }]
    })
    console.log("Created Web Scenario: ")
    console.log(web)[/FONT]
    then I get

    Code:
    [FONT=Courier New]{"jsonrpc":"2.0","error":{"code":-32500,"message":"Application error.","data":"No permissions to referred object or it does not exist!"},"id":"0.41578624915342344"}[/FONT]
    Question

    Can anyone explain why I get "No permissions to referred object or it does not exist!" when adding the required "url" key?


    Hugs,
    Sandra =)







  • Sandra
    Junior Member
    • Jun 2020
    • 10

    #2
    Dear admin

    I have found the problem.

    "h" doesn't contain the correct hostid. So please delete this post =)

    Comment

    Working...