Value should be a JSON object error in Zabbix

I have the following script:- #!/bin/bash echo “{” echo “\”data\”:[” grep -hoR server_name.* /etc/nginx/sites-enabled/|sed ‘s/[^ ]* //’|sed ‘s/.$//’|awk -F”/” ‘{ print “{\”{#URL}\”:\””$1″\”},” }’| head -c -2 echo “]” echo “}” This is set up as a UserParameter on the client UserParameter=url.discovery[*],/etc/zabbix/scripts/urls.sh and gives results such as { “data”:[ {“{#URL}”:”example.com”}] } I then have a discovery … Read more

How to reconfigure Ambari services values with blueprint.json file

we have many Ambari LAB clusters – Apache Ambari Version 2.5.0.3 , while ambari agent installed on Linux redhat machines my target is to find a way to update the values of services , on all the Ambari clusters , by automate the process what we do until now , is take each ambari cluster … Read more

Slow apache response time for json api (solved)

I’ve got an Apache server hosting several json APIs. This server is running Ubuntu 16.04.4 LTS with Apache and Mysql. Response times for all API are very good except for one! It takes about 5s to get a json response from the particular API whereas it takes milliseconds for the other APIs. I checked multiple … Read more

Cloudformation Trouble with Parsing

I am having some issues w/ using CloudFormation and CloudFront. I have been using the AWS resources to form my template, found here “OpenVPNCloudFront” : { “Type” : “AWS::CloudFront::Distribution”, “Properties”: { “DistributionConfig” : { “Origins” : [ { “DomainName” : { “Fn::Join” : [ “”, [ {“Ref” : “AWS::StackName”}, “.”, {“Ref” : “HostedZone”} ] ] … Read more

forward original syslog message

I would like to forward from a log collector many syslog message to another log collector and maintain the original syslog message. When I forward maybe the first log collector add a data and source ip address before the original message. I want to remove it and maintain the first original syslog message. Original “<159>ago … Read more

Ansible stdout from item collected with loop

Im trying to print stdout of registred items according to documentation documentation. Here is my yaml file: – name: network-check tags: stats shell: “tail -n 3 {{ ansible_facts[‘nodename’] }}_{{ item }}.out | awk ‘/Mbits/ { sum += $7; n++} END { print sum / n }'” loop: “{{ groups[‘all’] }}” when: ansible_facts[‘nodename’] != item register: … Read more

passing labels parameter to daemon.json in Docker

I am trying to setup docker daemon on Centos 7. The goal is to pass parameters to the overriding script in systemd and keep everything in daemon.json that is much more readable and cleaner Default script /etc/systemd/system/docker.service.d/10-machine.conf is: [Service] ExecStart= ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock –storage-driver overlay2 –tlsverify –tlscacert /etc/docker/ca.pem –tlscert /etc/docker/server.pem –tlskey /etc/docker/server-key.pem –label … Read more

Ansible json output return hello world

newbie on ansible i try to check if a json dict output exist from the proxmox API, but seems like i don’t register the output correctly: here is the yaml : https://pastebin.com/XdA5PMNg and here is the debug : https://pastebin.com/qxbsJ8rE Thanks all Answer The output goes to mystuff.stdout.stdout which is confusing. Use register: mystuff instead of … Read more

Zabbix : Invalid JSON

I have a Powershell script returning a file like : { “data”:[ { “{#SHARENAME}”:”Informatique”, “{#SHARENAME}”:”Marketing” } ] } I’ve set a discovery rule (zabbix agent) + an Item prototype (zabbix trapper) with the Key : sharename[{#SHARENAME}] But the discovery rule says : Invalid discovery rule value: cannot parse as a valid JSON object: invalid object … Read more