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:
javascript script item code:
Response example when I test the item from the template:
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
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/");
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"
"ip": "8.4.21.1",
"city": "Toronto",
"region": "Ontario",
"timezone": "America/Toronto",
"readme": "https://ipinfo.io/missingauth"
}
Comment