Questions tagged [json]
The json tag has no usage guidance.
115
questions
-1
votes
1
answer
27
views
fetch between brackets on json with grep
i have the following json data
"url": "https://www.etsy.com/listing/812858182/59ft-x-84ft-moroccan-rug-mrirt-rug-beni?utm_source=etsymeter&utm_medium=api&utm_campaign=api",
...
0
votes
0
answers
8
views
AWS instance choice for running JSON-SIMD intensive task
A program is bottlenecked by its ability the parse JSON; what should I look for when selecting an AWS instance for running SIMD libraries?
The specific library is Rust's SIMD-JSON library, but I ...
0
votes
0
answers
21
views
kyverno precondition for possible empty values
I am learning how to use kyverno to build some policies, but I am facing a few problems to understand some behaviour:
My first scenario is I want block some resource that may or may not have the spec....
2
votes
1
answer
79
views
json_query help - not producing expected output
I am trying to build an array to use for with_nested, but I cannot get past why json_query isn't outputting the actual hosts assigned to each cluster:
Play:
- name: Index clusters.json
shell: cat {{ ...
0
votes
0
answers
143
views
content type is returned as text/html while the expected is application/json
some endpoints are returning the content type as text/html while the expected is application/json causing CORS error in the client side. when requesting from my localhost or from the server's IP ...
0
votes
1
answer
789
views
Terraform: How to dynamically generate a block of a JSON policy?
I have the following resource:
resource "aws_iam_user_policy" "ses_send_policy" {
count = var.enabled ? 1 : 0
name_prefix = var.user_policy_name_prefix
user = ...
0
votes
0
answers
24
views
How to fix trailing comma errors of azure arm templates?
I have saved my arm template with yaml extension instead of json extension, because of this the vscode added trailing commas when I save the file.
Once I rename it, i am getting this error while arm ...
1
vote
1
answer
292
views
Using Zabbix to record JSON output from REST api? is it possible
I'm trying to use Zabbix (5.0) to capture the response from a REST API.
If I paste the following into a webbrowser (or wget / curl etc)
http://{username}:{password}@10.1.2.3:8443/api/metadata/
I get ...
2
votes
2
answers
2k
views
How do I Generate a Bearer Token for cURL to Get Thru IAP (GCP)?
I need to cURL a web app hosted behind IAP on GCP.
Normally, users log in through IAP and use the web app, but I need to run some cURL commands (interactive and non-interactive) that hit the web app ...
0
votes
1
answer
86
views
Dynamically passing a json as a parameter in a "command" task
I have this task in my playbook:
- name: Update instance tags
command: oci compute instance update -c {{ compartment }} --freeform-tags {{ tag_var_json }}
According to the oracle documentation ...
1
vote
1
answer
219
views
Append JSON dictonaries
I am using ansible 2.9 and cannot lookout for a way to append below JSON structure with data
"Variables":[
{
"Strings": [
"abc",
"...
0
votes
0
answers
402
views
Ansible - issue with loop and json_query's
I am using the ansible URI module to talk to a REST api. I have a task to perform a GET to get me some data that i want to use later on. I want to be able to match a certain variable from the GET to ...
0
votes
1
answer
161
views
Issues with converting JSON to CSV with nested values
So far I have had no problems converting standard JSON to CSV with jq in the past. But now my data becomes complicated.
Major base tags are account and subaccount. All other values are variables. The ...
0
votes
1
answer
280
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
1
answer
124
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
1
answer
99
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
2
answers
701
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
0
answers
31
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
2
answers
71
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
1
answer
60
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
1
answer
732
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
1
answer
326
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
0
answers
401
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 ...
1
vote
0
answers
479
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
1
answer
185
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
0
answers
59
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 ...
2
votes
2
answers
1k
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
1
answer
197
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, ...
3
votes
1
answer
12k
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 ...
2
votes
1
answer
409
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
1
answer
287
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
1
answer
27
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
0
answers
352
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
1
answer
104
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
0
answers
2k
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": ...
3
votes
1
answer
3k
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....
3
votes
1
answer
3k
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
1
answer
282
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
0
answers
448
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
1
answer
797
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
1
answer
2k
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
1
answer
5k
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
2
answers
218
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
0
answers
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
1
answer
795
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
1
answer
8k
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
1
answer
56
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
0
answers
178
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
1
answer
101
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
2
answers
5k
views
Ansible parsing a JSON output
I'm using URI in order to get a JSOn output to a register called "vchosts"
TASK [debug] ****************************************************************************************************************...