Ad Widget

Collapse

Curl request returns empty value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lbjensen
    Junior Member
    Zabbix Certified Specialist
    • Apr 2013
    • 16

    #1

    Curl request returns empty value

    Hi

    I have a weblogic REST call
    sudo -u zabbix /bin/curl -sk --user "userassword" -H "Accept: application/json" http://<IP>:7001/management/tenant-monitoring/clusters/cluster
    Returns from CLI:
    {"body":{"item":{"name":"kobra-cluster","servers":[{"name":"wls-01-01","state":"RUNNING","health":"HEALTH_OK","clus te rMaster":false,"resendRequestsCount":0,"fragmentsS entCount":121940,"fragmentsReceivedCount":0}]}},"messages":[]}
    Which is very good

    the item is configured as a userparameter
    UserParameter=weblogic.json[*],/bin/curl -sk --user "userassword" -H "Accept: application/json" $1

    From the Zabbix item i just get an empty value returned:
    76766:20200320:144110.660 for key [weblogic.json[http://<IP>:7001/management...obra-cluster]] received value []

    Frontend

    Macro {$CLUSTER}
    http://<IP>:7001/management/tenant-monitoring/clusters/kobra-cluster

    the latest data, is of course empty
    What could be the reason for the empty value

    Cheers
    Lars
    Last edited by lbjensen; 21-03-2020, 07:37.
  • lbjensen
    Junior Member
    Zabbix Certified Specialist
    • Apr 2013
    • 16

    #2
    SOLUTION
    SElinux was the reason for the script not working

    The output is fine now

    Comment

    Working...