Questions tagged [json]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

Ansible: Iteration fails while looping over output variable

Here is my debug output from an ansible playbook: "msg": { "changed": false, "failed": false, "instances": [ { ...
0
votes
1answer
14 views

failed to recognize JSON request: 'EOF'

I'm trying to use a Rest API, but when I query, I receive the following error that I don't understand, I've tried to look at similar questions here but they are very particular cases. This is the code ...
-1
votes
1answer
24 views

Azure policy definitions as code: avoiding duplicate parameter definitions

I'm looking to create a number of Azure policies using infrastructure as code. The MS Documentation advises a structure as below: . | |- policies/ ________________________ # Root folder for policy ...
0
votes
2answers
38 views

ansible - template json for environmental variable in docker container

I'm trying to assign a one-liner json string to an environmental variable in a docker container. This is what the json look like: {"ip_access": {"IP_whitelist": {"192.168.99....
0
votes
0answers
26 views

Query string printed in some responses

I have a very odd problem, I have a server running nginx as a reverse proxy for PHP. On the front end, I send ajax requests which expect json as response, when the request is made all works as ...
0
votes
2answers
45 views

Json file with bash

I need delete space and value kubernetes from json file with use bash script: Content json file Input "spec": { "finalizers": [ "kubernetes" ]...
0
votes
1answer
52 views

Tranforme each item in JSON array to JSON Object

I need to transform this simple JSON array : ["169","19","33"] To a more complicated JSON Object for each item, like : { "groups": [ { "...
1
vote
1answer
104 views

Nginx removes post data with content-type header

I am making posts like this: curl 'http://localhost/api.php' -H 'Content-Type: application/json' --data 'names=[{"name":"name"}]' Which results in the post data being deleted. If ...
0
votes
0answers
27 views

502 Bad Gateway & Unexpected End of JSON input

we just completed the migration of our EC2 service from AWS to GCP, tried to login through the external IP, we kept getting this error "Unexpected End of JSON input". We have also pointed ...
0
votes
1answer
130 views

Telegraf Tail file that contains json data to Influx

How can I extract the json data into influx by tailing a file that has the JSON data? EG: My logs are like this: 2020-12-01T18:34:06+02:00 10.132.90.194 {"wfd_successful_hits_sec": "0&...
1
vote
0answers
62 views

invalid JSON to monitor SMART on Zabbix

I've followed these steps on github: https://github.com/v-zhuravlev/zbx-smartctl to monitor the SMART disks in my Winsows servers on Zabbix. BUt when I add the template to the host I'd configured, on ...
0
votes
0answers
151 views

Lunajson not found in lua 5.2.3

I have installed lunajson with luarocks. When I attempt to use the module I keep getting the error below. I am just trying to decode a website that responds back with some json. The OS is running ...
0
votes
1answer
63 views

Google Cloud Speech-to-Text API key error

I tried to use the Google Cloud Speech-to-Text API but without any success. I have an API key error. Here is my api call : curl -s -H "Content-Type: application/json" \ -H "...
0
votes
0answers
34 views

automatically retrieve some fields from log file

My fortigate firewall send log message to my syslog server (CentOS 7). The syslog server store them to *.log file with rsyslog. Like this: Sep 24 00:00:00 192.168.20.20 date=2020-09-24 time=01:00:00 ...
1
vote
1answer
179 views

How to retrieve the routing tables in JSON format (linux)?

The ip command is able to return some of its results in JSON format, but it seems to be unable to format the routing table(s). Here are some examples of what I mean. List of all addresses: ip --json ...
0
votes
1answer
57 views

How can I set up syslog-ng to send only invalid JSON logs to a destination

I've set up syslog-ng 3.25.1 to read log messages from a file, parse them as JSON, and forward them to an ElasticSearch cluster. This works well when the messages are formatted correctly as JSON, ...
2
votes
1answer
4k views

Building List of JSON Objects in Ansible

I'm trying to build an array/list of JSON objects in Ansible. My playbook is called by specifying --extra-vars "userids=123456,654321". I then try to build the list with the following. "TBD" is ...
0
votes
1answer
118 views

How to read docker json log files in a readable format?

I always back up docker json log files when I deploy a new image version. Is there a linux program or command that lets me browse the log output from backed-up json log files in a readable format ...
1
vote
1answer
143 views

Working with array of object in Zabbix

My HTTP agent on Zabbix recieve data representing count of client's orders: { "orders": [ { "client_id": 1, "count": 2 }, { "client_id": 2, "count": 3 }, ...
0
votes
1answer
19 views

How can i Parametrize Azure Json file?

Please see that we have configured Dashboard in our other Azure subscription from where we have downloaded its template. Now we want to make it IaC (Infrastructure as Code) in our new Azure ...
0
votes
0answers
34 views

NGINX not loading JSON marked up file

Somehow my NGINX isn't loading my JSON marked up files (.TXT & .JSON types). This is my NGINX.CONF.default #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/...
0
votes
1answer
50 views

How can I create regular expression?

I need help with regular expressions. I have some queues in the rabbitMQ, about 1000: ha-collector-data-test2 ha-collector-data-1434 ha-collector-data-45-test3 ha-collector-data-terty4 ha-collector-...
1
vote
0answers
1k views

Convert json file to prometheus metrics

I have nginx json access log like this, a file that append sample like this to end of file. { "time": "2019-11-27T08:23:39+00:00", "msec": 1574843019.787, "ip": "91.133.248.69", "agent_name": ...
2
votes
1answer
1k views

jq sort by date (iso 8601)

I try to sort json by date (field CreationTimeUTC) in iso 8601 format with jq 1.5. I found this post, but that return : 'Cannot index boolean with string "CreationTimeUTC"' jq '.Entities....
2
votes
1answer
1k views

jq : Get values from children array and display on parent array [closed]

I try to get theses value : "VmDisplayName, CreationTimeUTC, EndTimeUTC, Reason, Result, State, TotalSize, BackupServerReference, BackupJobSessionReference" from this json : { "JobSessionUid": "...
1
vote
1answer
169 views

Install gRPC php extension in elastic-beanstack [closed]

I need to install gRPC php extension elastic-beanstack. The way i found is to write a config file inside ".ebextensions" in order to automatically install the extension. For that I need to create yaml ...
0
votes
0answers
352 views

Export content of JSON file in Terraform

I have the GCP service account key file in JSON format, which I need to export as GOOGLE_APPLICATION_CREDENTIALS. Is there a way in Terraform to provide the "contents" of this JSON file directly (...
3
votes
1answer
470 views

How to escape only quotes in haproxy log format

I am capturing the user-agent using: http-request capture req.hdr(User-Agent) len 192 And then trying to create a custom JSON log format like this: log-format '{"User-Agent":%{+Q,+E}[capture.req....
1
vote
1answer
923 views

Download |parse pem file aws secret manager

I have placed pem file as a key value on AWS Secret Manager. When I downloaded the pem file it downloaded as following format. -----BEGIN RSA PRIVATE KEY-----EncryptedText==-----END RSA PRIVATE KEY --...
0
votes
1answer
3k views

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 ...
0
votes
2answers
162 views

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 ...
2
votes
0answers
3k views

Parsing JSON event in Logstash

I have log in following format, it is a plain json with nested fields. { "level": "info", "message": { "req": { "headers": { "host": "localhost:8080", ...
0
votes
1answer
544 views

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 ...
0
votes
1answer
6k views

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'] }}_{{ ...
0
votes
1answer
24 views

nodejs server only works when started from cli

I'm trying to run a node app on my personal blog, which does display the static content, but cannot send POST calls back to the server when I start the server via systemctl. However when I run node ...
0
votes
0answers
173 views

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 ...
0
votes
1answer
84 views

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::...
2
votes
2answers
3k views

Ansible parsing a JSON output

I'm using URI in order to get a JSOn output to a register called "vchosts" TASK [debug] ****************************************************************************************************************...
0
votes
1answer
820 views

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 ...
9
votes
3answers
8k views

How get systemd status in json format?

I want to get service status details (Loaded, enabled, active, running, since, Main PID) in machine readable form and I know that systemd tools have --output=json option, but if I do: systemctl ...
2
votes
1answer
3k views

Convert JSON to CSV-BASH

JSON file: "UserDetailList": [ { "UserName": "citrix-xendesktop-ec2-provisioning", "GroupList": [], "CreateDate": "2017-11-07T14:20:14Z", "...
0
votes
1answer
807 views

bash: how to put variable into loop-command not found

jq '.issues[].fields.subtasks[].fields | .issuetype.subtask' 1.json works as expected (getting "true" as output) when trying to put command above as variable for custom_field in `cat 1.json | jq ....
1
vote
1answer
923 views

IAM policy to enforce tagging not working

0 down vote favorite I have created an IAM policy to deny creating EBS volumes if it is not tagged with both the keys "empname" and "team". The policy is attached to a test user. When I try to create ...
0
votes
1answer
1k views

creating new SSH user in ubuntu ec2 instance using cloudformation template userdata

I want to create new ssh user that can access instance using cloudformation template userdata. i am using this json script "sudo adduser jenkins-user --disabled-password\n", "sudo su - jenkins-user\...
14
votes
1answer
50k views

Loop over Ansible variable array in Jinja2 template

when Ansible gathers facts about hosts, it for example gets all the mounts of the host: "ansible_mounts": [ { "block_available": 7800291, "block_size": ...
1
vote
1answer
434 views

Storage profile error when deploying new machine using json template

I'm trying to deploy two vm's in an avset using visual studio 2015. I get the error message below when I attempt to deploy: New-AzureRmResourceGroupDeployment : 2:03:59 AM - Resource Microsoft....
1
vote
1answer
2k views

Error when deploying JSON template

I'm trying to deploy two VMs in an avset using Visual Studio 2015. I get the error message below when I attempt to deploy: Reference Id 1 is not formatted correctly. The Id is expected to reference ...
0
votes
1answer
147 views

How to expand security groups mapping in order to add another level per region in a CloudFormation template?

I've wrote a CloudFormation template which creates an AutoScaling Group which in turn starts up servers per environment. Up until today the company has been working in region us-west-2 and the ...
0
votes
2answers
2k views

Haproxy httpchk with json

I need to check backend with POST JSON but cannot find a way to do this. Below is the curl POST that works. How do I do with in HAPROXY httpchk curl -H "Content-Type: application/json" -X POST -d '["...
0
votes
2answers
8k views

jq Cannot index errors

I am trying to use jq to get certain information from this endpoint curl -s https://bittrex.com/api/v1.1/public/getmarketsummaries/ | jq '[.]' and the output below [ { "success": true, "...