Reputation: 1
I am trying to parse this JSON data in fluentd, could you please suggest the parser and the configuration which can be used to parse this data
[
{
"Priority": 65000,
"NSG Name": "new_nsg",
"Rule Name": "AllowVnetInBound",
"SourceAddressPrefix": [
"VirtualNetwork"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"VirtualNetwork"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Allow",
"Direction": "Inbound"
},
{
"Priority": 65001,
"NSG Name": "new_nsg",
"Rule Name": "AllowAzureLoadBalancerInBound",
"SourceAddressPrefix": [
"AzureLoadBalancer"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"*"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Allow",
"Direction": "Inbound"
},
{
"Priority": 65500,
"NSG Name": "new_nsg",
"Rule Name": "DenyAllInBound",
"SourceAddressPrefix": [
"*"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"*"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Deny",
"Direction": "Inbound"
},
{
"Priority": 65000,
"NSG Name": "new_nsg",
"Rule Name": "AllowVnetOutBound",
"SourceAddressPrefix": [
"VirtualNetwork"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"VirtualNetwork"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Allow",
"Direction": "Outbound"
},
{
"Priority": 65001,
"NSG Name": "new_nsg",
"Rule Name": "AllowInternetOutBound",
"SourceAddressPrefix": [
"*"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"Internet"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Allow",
"Direction": "Outbound"
},
{
"Priority": 65500,
"NSG Name": "new_nsg",
"Rule Name": "DenyAllOutBound",
"SourceAddressPrefix": [
"*"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"*"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Deny",
"Direction": "Outbound"
}
]
I tried something like this but nothing working.
[
{
"Priority": 65000,
"NSG Name": "new_nsg",
"Rule Name": "AllowVnetInBound",
"SourceAddressPrefix": [
"VirtualNetwork"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"VirtualNetwork"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Allow",
"Direction": "Inbound"
},
{
"Priority": 65001,
"NSG Name": "new_nsg",
"Rule Name": "AllowAzureLoadBalancerInBound",
"SourceAddressPrefix": [
"AzureLoadBalancer"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"*"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Allow",
"Direction": "Inbound"
},
{
"Priority": 65500,
"NSG Name": "new_nsg",
"Rule Name": "DenyAllInBound",
"SourceAddressPrefix": [
"*"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"*"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Deny",
"Direction": "Inbound"
},
{
"Priority": 65000,
"NSG Name": "new_nsg",
"Rule Name": "AllowVnetOutBound",
"SourceAddressPrefix": [
"VirtualNetwork"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"VirtualNetwork"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Allow",
"Direction": "Outbound"
},
{
"Priority": 65001,
"NSG Name": "new_nsg",
"Rule Name": "AllowInternetOutBound",
"SourceAddressPrefix": [
"*"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"Internet"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Allow",
"Direction": "Outbound"
},
{
"Priority": 65500,
"NSG Name": "new_nsg",
"Rule Name": "DenyAllOutBound",
"SourceAddressPrefix": [
"*"
],
"SourcePortRange": [
"*"
],
"DestinationAddressPrefix": [
"*"
],
"DestinationPort": [
"*"
],
"Protocol": "*",
"Access": "Deny",
"Direction": "Outbound"
}
]
Upvotes: 0
Views: 31