Ad Widget

Collapse

javascript item can't be enabled - zabbix 6.0.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • verde
    Member
    • Jul 2021
    • 39

    #1

    javascript item can't be enabled - zabbix 6.0.2

    Hello

    I have a template assigned to some hosts. These hosts don't have configure an interface addr since they only receive data (trapper items).

    I've added a new "script item" to the template as disable. The creation was successful, with no errors at all.

    When I try to enable the "script item" on each host, the item remains disabled. The GUI is not showing any errors.
    I thought it could be because the hosts don't have any interfaces configured. So, I added agent interface with IPaddresses. But the behavior is the same, when I try to enable the item, it remains disabled.

    This new script item is not running.


    Any help or clue to review or configure?


    Item creation data:
    Name: newItem
    Type: Script
    Key: newitem
    Type of information : Log
    Script: var request = new HttpRequest();…
    Timeout: 3s
    Update interval:3m


    javascript script item code:
    var request = new HttpRequest();
    return request.get("https://ipinfo.io/");

    Response example when I test the item from the template:
    {
    "ip": "8.4.21.1",
    "city": "Toronto",
    "region": "Ontario",
    "timezone": "America/Toronto",
    "readme": "https://ipinfo.io/missingauth"
    }
  • verde
    Member
    • Jul 2021
    • 39

    #2
    I've upgraded to 6.2 and I could run javasript items, but not sure if really was the upgrade or any attribute on the host or during the host creation.
    Regards

    Comment

    Working...