Warning: API call to create metrics set failed:
[Pipeline] echo
net.sf.json.JSONException: Invalid JSON String
at net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:143)
at net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:103)
at net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:84)
at org.jenkinsci.plugins.pipeline.utility.steps.json.ReadJSONStepExecution.doRun(ReadJSONStepExecution.java:86)
at org.jenkinsci.plugins.pipeline.utility.steps.AbstractFileOrTextStepExecution.run(AbstractFileOrTextStepExecution.java:32)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I'm basically using a script on jenkins piepline to send data to grafana I'm facing this issue on jenkins version 2.235.1
The same script is working on another jenkins instance and it doesn't display this error
I think it's caused by plugin deprecated version or jenkins itself
I'm not sure if there is a workaround or which plugin to update