Traffic Logging Config
Order now | Download | FAQ
Traffic Logging Get Config
Request Structure: https://<puqvpnvp>/api/v1/traffic_logging
Method: GET
Example:
curl \
-b "access_hash=f3a4359ffc8c62629e1067c76df99cda7d64f4e82f8e24e6fa9569b9b48de5c58af8d53b4f444a70" \
-X GET https://dev.softkeel.com/api/v1/traffic_logging
Response example:
{
"error" : "",
"msg" : {
"enabled" : true,
"enabled_influxdb" : true,
"enabled_remote_syslog" : true,
"established" : true,
"incoming" : false,
"influxdb_bucket" : "logs_puqvpncp",
"influxdb_organization" : "PUQ sp. z o.o.",
"influxdb_token" : "xbU0AfUh0mPsP9Izviojd0TGLIyo8Io1PFW3DXK2VQDeoUEDDBXwEkJ36A6H2uDBIiW7DEVsG4TgGiUTq6rslg==",
"influxdb_url" : "http://77.87.125.208:8086",
"interface_in" : false,
"interface_out" : false,
"invalid" : false,
"len" : false,
"mark" : false,
"new" : false,
"related" : true,
"remote_syslog_server" : "77.87.125.208",
"remote_syslog_server_port" : 514,
"tos" : false,
"untracked" : false
},
"status" : "success"
}
Errors:
-Not authorized
Traffic Logging Edit Config
Request Structure: https://<puqvpnvp>/api/v1/traffic_logging
Method: PUT
PUT data:
Not required:
"enabled" = 1|0
"enabled_influxdb" = 1|0
"enabled_remote_syslog" = 1|0
"established" = 1|0
"incoming" = 1|0
"influxdb_bucket" = "<bucket_name>"
"influxdb_organization" = "<organization_name>"
"influxdb_token" = "<influxdb_token>"
"influxdb_url" = "influxdb_url"
"interface_in" = 1|0
"interface_out" = 1|0
"invalid" = 1|0
"len" = 1|0
"mark" = 1|0
"new" = 1|0
"related" = 1|0
"remote_syslog_server" = <XXX.XXX.XXX.XXX>
"remote_syslog_server_port" = 1-65536,
"tos" = 1|0
"untracked" = 1|0
Example:
curl \
-b "access_hash=f3a4359ffc8c62629e1067c76df99cda7d64f4e82f8e24e6fa9569b9b48de5c58af8d53b4f444a70" \
-d "enabled=1&\
enabled_influxdb=1&\
enabled_remote_syslog=1&\
established=1&\
incoming=0&\
influxdb_bucket=logs_puqvpncp&\
influxdb_organization=PUQ sp. z o.o.&\
influxdb_token=xbU0AfUh0mPsP9Izviojd0pGLIyo8Io1PFW8DXKHVQDeoUEDDBXwEkJ36A6H2uDBIiW7DEVsG4TgGiUTq6rslg==&\
influxdb_url=http://77.87.125.208:8086&\
interface_in=0&\
interface_out=0&\
invalid=0&\
len=0&\
mark=0&\
new=0&\
related=1&\
remote_syslog_server=77.87.125.208&\
remote_syslog_server_port=514&\
tos=0&\
untracked=0" \
-X PUT https://dev.softkeel.com/api/v1/traffic_logging
Response example:
{
"error" : "",
"msg" : {
"enabled" : true,
"enabled_influxdb" : true,
"enabled_remote_syslog" : true,
"established" : true,
"incoming" : false,
"influxdb_bucket" : "logs_puqvpncp",
"influxdb_organization" : "PUQ sp. z o.o.",
"influxdb_token" : "xbU0AfUh0mPsP9Izviojd0pGLIyo8Io1PFW8DXKHVQDeoUEDDBXwEkJ36A6H2uDBIiW7DEVsG4TgGiUTq6rslg==",
"influxdb_url" : "http://77.87.125.208:8086",
"interface_in" : false,
"interface_out" : false,
"invalid" : false,
"len" : false,
"mark" : false,
"new" : false,
"related" : true,
"remote_syslog_server" : "77.87.125.208",
"remote_syslog_server_port" : 514,
"tos" : false,
"untracked" : false
},
"status" : "success"
}
Errors:
-Not authorized
-Remote Syslog Server must be filled
-InfluxDB Telegraf not installed
-InfluxDB Url must be filled
-InfluxDB Token must be filled
-InfluxDB Bucket must be filled
-InfluxDB Organization must be filled
-At least one logging method must be enabled (Remote Syslog or/and InfluxDB)
No Comments