Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix http_access_log_combined config json file parse/read command #562

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bnerickson
Copy link
Contributor

Before the change:

$ sudo perl snmp/http_access_log_combined -c /etc/snmp/http_access_log_combined.json 
, or } expected while parsing object/hash, at character offset 2 (before "(end of string)") at snmp/http_access_log_combined line 229.

After change:

$ sudo perl snmp/http_access_log_combined -c /etc/snmp/http_access_log_combined.json 
{"error":"0","data":{"totals":{"201":0,"497":0,"424":0,"413":0,"408":0,"406":0,"495":0,"304":0,"501":0,"400":0,"507":0,"202":0,"205":0,"419":0,"2xx":36,"100":0,"505":0,"5xx":0,"size":10977303,"502":0,"207":0,"306":0,"218":0,"300":0,"503":0,"404":0,"308":0,"499":0,"428":0,"no_refer":2,"bytes_mean":46057.4,"510":0,"411":0,"http1_1":2,"203":0,"420":0,"426":0,"no_user":36,"CONNECT":0,"417":0,"bytes_median":8392,"509":0,"PUT":0,"refer":34,"415":0,"DELETE":0,"412":0,"HEAD":0,"bytes_mode":"126629","bytes_max":126629,"POST":34,"506":0,"500":0,"303":0,"401":0,"451":0,"508":0,"102":0,"208":0,"1xx":0,"user":0,"PATCH":0,"414":0,"200":36,"423":0,"206":0,"4xx":0,"496":0,"405":0,"402":0,"bytes_range":125583,"101":0,"429":0,"GET":2,"407":0,"431":0,"204":0,"421":0,"OPTIONS":0,"http3":0,"416":0,"511":0,"444":0,"410":0,"226":0,"301":0,"504":0,"http1_0":0,"bytes_min":1046,"403":0,"307":0,"422":0,"bytes":1612009,"425":0,"103":0,"error_size":0,"http2":0,"409":0,"305":0,"3xx":0,"302":0,"494":0},"logs":{"librenms:443":{"103":0,"error_size":0,"http2":0,"307":0,"422":0,"bytes":0,"425":0,"305":0,"3xx":0,"302":0,"494":0,"409":0,"OPTIONS":0,"416":0,"http3":0,"511":0,"410":0,"444":0,"204":0,"421":0,"226":0,"301":0,"504":0,"http1_0":0,"bytes_min":0,"403":0,"bytes_range":0,"4xx":0,"496":0,"405":0,"402":0,"407":0,"431":0,"101":0,"429":0,"GET":0,"451":0,"508":0,"506":0,"500":0,"303":0,"401":0,"200":0,"423":0,"206":0,"102":0,"208":0,"1xx":0,"PATCH":0,"user":0,"414":0,"CONNECT":0,"417":0,"bytes_median":0,"509":0,"PUT":0,"refer":0,"no_user":0,"bytes_mode":0,"POST":0,"bytes_max":0,"415":0,"DELETE":0,"412":0,"HEAD":0,"499":0,"308":0,"306":0,"218":0,"503":0,"300":0,"404":0,"http1_1":0,"203":0,"420":0,"426":0,"428":0,"no_refer":0,"bytes_mean":0,"510":0,"411":0,"100":0,"507":0,"202":0,"205":0,"419":0,"2xx":0,"505":0,"5xx":0,"502":0,"size":0,"207":0,"413":0,"201":0,"497":0,"424":0,"406":0,"495":0,"304":0,"501":0,"400":0,"408":0},"librenms:80":{"507":0,"202":0,"205":0,"419":0,"2xx":36,"100":0,"505":0,"5xx":0,"207":0,"size":10977303,"502":0,"201":0,"497":0,"424":0,"413":0,"408":0,"406":0,"495":0,"304":0,"501":0,"400":0,"no_user":36,"CONNECT":0,"417":0,"bytes_median":8392,"509":0,"PUT":0,"refer":34,"415":0,"DELETE":0,"412":0,"HEAD":0,"bytes_mode":"126629","POST":34,"bytes_max":126629,"306":0,"218":0,"503":0,"300":0,"404":0,"499":0,"308":0,"428":0,"no_refer":2,"bytes_mean":46057.4,"510":0,"411":0,"http1_1":2,"203":0,"420":0,"426":0,"4xx":0,"496":0,"405":0,"402":0,"bytes_range":125583,"429":0,"101":0,"GET":2,"407":0,"431":0,"506":0,"500":0,"303":0,"401":0,"451":0,"508":0,"102":0,"208":0,"1xx":0,"user":0,"PATCH":0,"414":0,"200":36,"423":0,"206":0,"307":0,"422":0,"bytes":1612009,"425":0,"103":0,"error_size":0,"http2":0,"409":0,"305":0,"3xx":0,"302":0,"494":0,"204":0,"421":0,"OPTIONS":0,"416":0,"http3":0,"511":0,"444":0,"410":0,"226":0,"301":0,"504":0,"403":0,"bytes_min":1046,"http1_0":0}}},"errorString":"","version":1}

@bnerickson bnerickson changed the title Fix http_access_log_combined config json parse command Fix http_access_log_combined config json file parse/read command Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant