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

[Q] ; 'bad pickle message' in go-carbon.log #430

Open
frankdurv opened this issue Sep 16, 2021 · 3 comments
Open

[Q] ; 'bad pickle message' in go-carbon.log #430

frankdurv opened this issue Sep 16, 2021 · 3 comments
Labels

Comments

@frankdurv
Copy link

I replaced carbon-cache by go-carbon (version 0.15.6)
Data comes from a Nagios server. With carbon-cache was working fine.
go-carbon is giving "bad pickle message", for all data coming from Nagios.

I get messages like this in the go-carbon.log file:
[2021-09-14T09:24:44.888+0200] INFO [pickle] can't parse message {"data":

S'ims.1360com.t1c-com-1-1.load.load1'\n(S'1631604224'\np154\nS'0.100'\np155\nttp156\na(S'ims.1360com.t1c-com-1-1.load.load5'\n(g154\nS'0.180'\np157\nttp158\na(S'ims.1360com.t1c-com-1-1.load.load15'\n(g154\nS'0.240'\np159\nttp160\na

(S'ims.broadworks.ipcas.t1b-ipcas-5-2.SignalDelay.Sip_Answer_Max'\np233\n(g221\nS''\nttp234\na.", "error": "bad pickle message"}

Any idea what could be wrong here?

@deniszh
Copy link
Member

deniszh commented Sep 16, 2021

Hi @frankdurv

That's strange, after #340 go-carbon should parse pickle for Python versions 2.x and 3.x (protocols 2,3,4,5). Which graphite and python version do you using?

@frankdurv
Copy link
Author

frankdurv commented Sep 16, 2021 via email

@zerosoul13
Copy link
Contributor

@frankdurv This normally happens when pickle.dumps does not specify a protocol. How are you sending the data from Nagios to Graphite?

Graphite documentation shows the following example to send Pickle format to Graphite:

payload = pickle.dumps(listOfMetricTuples, protocol=2)
header = struct.pack("!L", len(payload))
message = header + payload

Just for kicks I looked up a Nagios/Graphite integration and came across Graphios repository. The code does not specify the protocol

# procotol not specified in `pickle.dumps` call
payload = pickle.dumps(metric_list_chunk) 
header = struct.pack("!L", len(payload))
message = header + payload
messages.append(message)

This could be your case or not. Wanted to share an example to illustrate the possible root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants