Questions tagged [json]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
66 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
17 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 ...
0
votes
0answers
24 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
17 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
15 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
0answers
48 views

How do I allow POST method in Ansible Tower

Currently, it looks like Tower just allows GET, HEAD, OPTIONS. I get a 401 unauthorized error when trying to get an OAuth 2.0 token for my application. GET /api/ HTTP 200 OK Allow: GET, HEAD, ...
0
votes
1answer
43 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-...
0
votes
0answers
13 views

Azure DF: Get metadata of millions of files located in a VM and call a store procedure to update file details in a DB

An alternative solution I found is, pass "Getmetadata" JSON output to the store procedure and inside the procedure parse JSON with OpenJSON library ans update table. But when I pass JSON ouput to ...
1
vote
0answers
495 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": ...
1
vote
1answer
324 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
217 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": "...
0
votes
0answers
64 views

Docker time-based log rotation

Currently docker supports file sized base log rotation if using a json-driver. What I need is time based log rotation (lets say hourly). Using *nix logrotate is not an option, since it's losing logs ...
1
vote
1answer
80 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
86 views

gserviceaccount Address not found

On my google cloud account, I am using Google Drive API. For my service account "qotd_db", I have generated the credentials already. I am trying to access a google spreadsheet present in the google ...
0
votes
0answers
224 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
213 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....
0
votes
1answer
364 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
1k 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
111 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
2k 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
374 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
3k 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
14 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
166 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
67 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
2k 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
474 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 ...
7
votes
3answers
6k 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
706 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
766 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
823 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\...
12
votes
1answer
40k 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
324 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
1k 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
125 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
1k 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
6k 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
874 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
352 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 ...
1
vote
2answers
5k 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
4k 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
6k 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
656 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
3k 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
463 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
479 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,...
1
vote
2answers
6k 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
930 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..." ...