Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [json]

The tag has no usage guidance.

1
vote
0answers
20 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
0answers
14 views

How to Fix Failed while decoding JSON: Can't connect to www.example.com:443 error?

Changed domain name and also changed cron values with new domain name. But when trying to transfer files from one server to another, the cron on targeted server doesn't run. This is CentOS 7 with ...
0
votes
1answer
22 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
87 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
12 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
188 views

Merge two JSON strings with jq

I've been banging my head against the wall with this one a little bit, partially because I'm new to jq. I have JSON output from one command (terraform output -json). I want to take this data, rename ...
0
votes
0answers
47 views

Use existing response body for CGI HTTP errors (Tomcat 8)

We are using a custom servlet in Tomcat via the org.apache.catalina.servlets.CGIServlet class. Everything seems to be going fine so far - we can access the required endpoint. However, the program ...
0
votes
0answers
68 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
33 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
524 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
246 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 ...
4
votes
3answers
2k 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
1k views

Convert JSON to CSV-BASH

JSON file: "UserDetailList": [ { "UserName": "citrix-xendesktop-ec2-provisioning", "GroupList": [], "CreateDate": "2017-11-07T14:20:14Z", "...
0
votes
1answer
422 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
420 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
527 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\...
6
votes
1answer
20k 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
132 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
540 views

Error when deploying 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: Reference Id 1 is not formatted correctly. The Id is expected to reference ...
0
votes
1answer
34 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
764 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
1answer
3k 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, "...
1
vote
1answer
572 views

JSON parsing with Nagios plugin

I am looking to use Drew Kerrigan's JSON Nagios plugin on GitHub (drewkerrigan/nagios-http-json) to monitor the output from a REST API, but I am struggling to get the query syntax right. Here is a ...
0
votes
1answer
194 views

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

Powershell - Split Array Value keep first element

I'm trying to extract just the IPs from a filtered JSON using the following code: $curl = Invoke-WebRequest -Method Get -Uri "http://urltojson.com/file.json" $curl2 = $curl.Content.replace("Script", "...
0
votes
1answer
3k views

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"\"}," }'| ...
1
vote
3answers
3k views

Date field is being presented as integer

I have an Elastic Stack server (on Hyper-v) that is ingesting data via a logstash exec command and performing analytics on it. Everything is working great except a date field that is being displayed ...
0
votes
2answers
432 views

How can I make salt-api return more useful data?

salt-master: 2016.11.5 (Carbon) salt-api: 2016.11.5 (Carbon) salt-minion 2016.11.5 (Carbon) cherrypy: 10.2.2 After setting up salt-api using this tutorial I've been able to successfully use the API ...
0
votes
1answer
2k views

Zabbix Discovery JSON Formatting

I trying to create a discovery rule to monitor a enterprise application, and my script return the follow JSON. { "data": [{ "{#NODENAME}": "node1", "{#NODEINTERFACE}": ["...
0
votes
1answer
403 views

How to choose collation for SQL Azure IAAS

We are trying to define a parametric IAAS SQL Server setup. But we require a different collation than the default sql_latin01_general_cp1_ci_as. I can't seem to find it in the json template / ...
0
votes
1answer
296 views

Configuring rlm_rest module in FreeRadius for accounting

I'm upgrading from FreeRadius 2 to FreeRadius 3 and changing some integration point from sql to rest module. Actually, I have two accounting points: accounting_start_query and accounting_start_query,...
0
votes
2answers
3k views

Run bash command with json parameters from jq

How can I run a bash command for every json object in a json array using jq? So far I have this: cat credentials.json | jq -r '.[] | .user, .date, .email' | mycommand -u {user} -d {date} -e {email} ...
2
votes
0answers
36 views

AWS-Hadoop Data Analytics Implementation for Multiple JSON Files

I am new to hadoop and AWS. I have setup multi-node (4 instances t2.large) AWS EC2 cluster with cloudera Hadoop distribution. I have tested the environment with basic examples using CSV files such as ...
1
vote
1answer
150 views

How to tell jq to print the content of two keys for each instance returned by aws ec2 cli

running aws ec2 describe-instances will return a json text similar to the following: { "Reservations": [ { "Instances": [ "PublicDnsName": "ec2..." ...
1
vote
0answers
131 views

htaccess require host domain not working correctly

I have a folder full of folders with json files. I want to restrict AJAX requests to these files to certain domains. I made an htaccess file to restrict this but it isn't work. My htaccess is as ...
1
vote
0answers
93 views

AWS EC2 IAM User Policy Error

I'm trying to create a user policy which allows specific users access to only the following permissions within a specific VPC: Create Instances Start Instances Stop Instances Terminate Instances I ...
0
votes
1answer
2k views

error “The json extension is missing. Please check your PHP configuration.” displayed after installng phpmyadmin

Installed phpmyadmin and tried to access http://www.example.com/phpmyadmin, but error displayed in my browser error : " The json extension is missing. Please check your PHP configuration." My ...
0
votes
1answer
11k views

package org.json does not exist

I downloaded the JSON library for Java from Maven Repo and installed the .JAR file at the Java library directory on UBuntu 14.04. I tried compile a simple JAVA snippet for JSON parsing, but the ...
0
votes
1answer
656 views

Why HTTP 501 error of type JSON presented to UI as text/html instead of application/json?

I have front-end Angular running on Apache with back-end Spring REST API on Tomcat. I wanted to throw 501 error in some error case and want that response to be presented as JSON to UI (Content-Type ...
0
votes
1answer
295 views

JSON Parse Error in Windows Sensu Client Powershell Setup Script - unexpected character at line 1, column 1

I am creating a install script for Sensu on Windows and am getting this error upon starting the service: { "timestamp": "2016-04-14T23:05:45.043371+0100", "level": "warn", "message": "config ...
2
votes
3answers
4k views

Output IPaddress of VM using ARM template

Have a ARM template (https://github.com/jmspring/arm-template-neo4j-docker/blob/master/azuredeploy.json) which will launch a instance and assign a public IP. here i need to print the IP address as ...
0
votes
1answer
1k views

accounting in rlm_rest Module freeradius

I work on a Hotspot Project with Coova Chilli and Freeradius. I Use FreeRADIUS in the latest stable Version 3.0.11. I created my rest and sites-enabled config file according to this post: Configuring ...
2
votes
1answer
695 views

ansible custom facts returning string not array

I have a custom fact for my servers to retrieve customer data. This works fine on the machine and returning valid json. I can write the output to another facts-file and this works perfectly fine too. ...
3
votes
2answers
3k views

awcli query option for multiple filter expressions

Given the output of aws ec2 describe instances I am trying to display objects that have no Platform value and DO have a VpcId value. So far I have come up with this: aws ec2 describe-instances --...
2
votes
2answers
370 views

Knife not parsing JSON variable in PowerShell

I am trying to create an amazon EC2 instance using "knife ec2 server create" and passing in JSON to override the default settings by using the -j option where $json is properly formed JSON text and I ...
0
votes
1answer
2k views

Error 404 or 500 when downloading large static JSON file in IIS 7

What I wanted to do was fairly simple you would think. Create static json file so browsers can cache output and you don't have to poll the database for large chunks of data. So I created a JSON file ...
0
votes
1answer
1k views

rsyslog convert json to text on the fly

I have application logging events in JSON format for later structured queries, etc. Now I have a task to log the same messages in plain text (CSV probably) and I really don't want to log each event ...
0
votes
0answers
536 views

Squid GET request returns incorrect content type when using transparent mode

I'm trying to establish the cause of a strange issue with mobile device that goes through a Squid 3.3 proxy on CentOS 7 using transparent mode which is not able to access news content within the Bing ...
1
vote
0answers
220 views

Amazon EC2 gives internal server error when posting via Python

I have a problem with python API and MY ec2 instance. When I am trying to post a json I am getting an error like 500 INTERNAL SERVER ERROR {"error_message": "Sorry, this request could not be ...
0
votes
1answer
8k views

multiple post requests using wget and same base-url

wget has nice option that lets you allow downloading multiple files from same location (I mean combination of --base and --input-file) Advantage of this, is that if possible wget tries to reuse ...