Questions tagged [json]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
8k views

Zabbix : Invalid JSON

I have a Powershell script returning a file like : { "data":[ { "{#SHARENAME}":"Informatique", "{#SHARENAME}":"Marketing" } ] } I've set a discovery ...
0 votes
1 answer
129 views

how can I configure All-in-one WAZUH for log retention?

I installed WAZUH all-in-one no kibana no elastics, and I want to write a code where I can make 40 days of log retention, Any advice or guides for this solution?
0 votes
1 answer
6k 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
2 answers
9k views

Passing JSON application log to remote LogStash via NXLog on Windows

I have been trying to pass logs from a windows application which are already formatted in JSON to logstash via NXlog. When I have NXLOG send the file to Logstash, I get blasted with errors in the ...
0 votes
1 answer
105 views

Syslog-ng Syslog Format to JSON Format are there pre-requisite?

My first time posting to Stack Overflow. I apologize if I am re-asking a question. I tried to search but nothing is really clear about what I'm trying to understand. Do I need to configure additional ...
1 vote
1 answer
10k 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
192 views

Can I generate and log output alerts for SMTP traffic using Suricata 7.0.2?

I have Suricata 7.0.2 IDS installed on a Linux Ubuntu 20.04 virtual machine. In my virtual environment, I have two virtual networks. In the first network, I have a mail user agent (Attacker) that ...
0 votes
0 answers
40 views

Need help on how to Reset the powerstate of multiple VM's similar to obtaining multiple VM's powerstate using a VMware Dynamic Inventory File

I am trying to create and use a playbook that will reset the power of ONE, TWO or ALL VM's similiar to the playbook I use to obtain the powerstate of ONE, TWO or ALL VM's. Here is my current setup and ...
0 votes
0 answers
70 views

How do files/attachments appear within the JSON output of the Microsoft Graph API 'Get Incident' HTTP call?

I'm currently working on an Azure Logic App, and wanted to know how files/attachments appear within the JSON output of the graph api 'get incident' call. All of my test outputs so far have not ...
1 vote
1 answer
225 views

Update JSON Payload using Powershell and Nutanix API

I'm currently writing a script that allow to update Nutanix VM Categories. Categories format is key:value and a VM may have no categories, 1 or multiple. Process to do that is quite simple : first I ...
0 votes
1 answer
171 views

Jira - REST API returns HTML on one VPS but JSON on another VPS

I am facing a very strange issue which I cannot solve. Basically, I have 2 VPS machines which I connect via RDP as they are both Windows Server machines. I have cURL on both of them. One is running ...
14 votes
3 answers
17k 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 ...
0 votes
0 answers
248 views

Errors importing JSON file to MySQL using mysqlsh Util.import_json

I am having errors in attempting to import a file into MySQL (8.0.32-0ubuntu0.22.04.2) using: mysqlsh mysqluser@localhost/jsondb --import /path/to/file.json If the file is in, say, my home directory, ...
0 votes
1 answer
197 views

Transform each item in a JSON array to a JSON object

I need to transform this simple JSON array: ["169","19","33"] to a more complicated JSON object for each item, like: { "groups": [ { "groupid&...
2 votes
3 answers
5k 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
1k views

How to prevent the Chrome Default Browser Prompt and Welcome Screen Using Master Preferences file?

I am attempting to deploy Chrome and have followed Jay Michaud's guide found HERE. I have created my JSON file corresponding to Chrome's most recent provided information on doing so found in the links ...
0 votes
1 answer
1k views

AWS CLI : How to use "--query" to get output from nested JSON

I am using aws-cli v2 to get the --query output from AWS Describe-volumes. In this, I am trying to get the volume id, size, Instance ID, state. Instance ID is nested in the AWS Describe-volumes. ...
2 votes
1 answer
422 views

Create JSON Patch 6902 from two yaml/json files

Imagine I have a file foo.yaml and a modified version of this file called foo2.yaml. Is there a way to create a correspondig json patch 6902?
0 votes
0 answers
186 views

Nginx headers parsing

For example, I have nginx and incoming JSON header: { "orgs" : { "first_org_roles": ["role_a_r", "role_b_r", "role_c_r"], "...
0 votes
1 answer
835 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....
0 votes
2 answers
14k 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, "...
0 votes
1 answer
2k 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 ...
0 votes
1 answer
3k 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 ...
0 votes
1 answer
358 views

Error: The response is not a valid json response. WordPress Windows server

I personally rented a Windows virtual server and installed and set up mysql+phpadmin+IIS and after that I started my email server and tested it and everything was ok, then I installed WordPress and ...
5 votes
2 answers
17k 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
1 answer
2k views

Power Automate: Duplicate chat members is specified in the request body

I'm creating a chat bot that handles basic IT Support tasks. I've created a flow within a Power Virtual Agent, that puts the user that made the support request into a teams chat with myself. I've ...
0 votes
2 answers
321 views

Ansible module returns non json data

Ansible Azure module returns the data in a weird format Double single quoted characters. ''network_interface_names'': [''Ubuntu915''] As a result I can't use this anywhere to filter other resources. ...
0 votes
1 answer
831 views

Copy large-size JSON content and paste it into MySQL column

I have a column with the data type "JSON" in the MySQL table(I have MySQL 8). I have a 20 MB JSON file created by my BE code and I would like to copy and paste the contents of the JSON file ...
-1 votes
1 answer
1k 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", ...
2 votes
1 answer
2k 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
766 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 ...
4 votes
2 answers
11k 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 ...
1 vote
1 answer
6k 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 ...
4 votes
4 answers
48k views

Fatal error: Call to undefined function json_encode() ..?

Im trying to use json with php and i keep getting the error PHP Fatal error: Call to undefined function json_encode() I am using php version 5.3.6 and on phpinfo(); nothing mentions json. ...
0 votes
1 answer
2k 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
2k 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", "...
1 vote
1 answer
746 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
975 views

Ansible: Iteration fails while looping over output variable

Here is my debug output from an ansible playbook: "msg": { "changed": false, "failed": false, "instances": [ { ...
-1 votes
1 answer
212 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 ...
1 vote
1 answer
905 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 ...
0 votes
2 answers
2k 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
88 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
142 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" ]...
1 vote
1 answer
2k 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
680 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
1k 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 ...
2 votes
0 answers
950 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
277 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
111 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
1 answer
743 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 }, ...