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

No data from OpenCensus/malware-scanning/* custom metrics #178

Open
ntpct1993 opened this issue Jul 23, 2024 · 4 comments
Open

No data from OpenCensus/malware-scanning/* custom metrics #178

ntpct1993 opened this issue Jul 23, 2024 · 4 comments

Comments

@ntpct1993
Copy link

Hi,

As mentioned from the issue title, there is no data from all custom metrics.
The rest (scanning stuff) are working fine for me - thank you for your work.

I added some debug logs in metrics.js to see what happened there and to make sure metrics.js was called.
I'm sure that writeScanCleanMetric and writeScanInfectedMetric functions were called

writeScanCleanMetric ====== sourceBucket: phucnguyen-clamav-unscanned - destinationBucket: phucnguyen-clamav-unscanned - fileSize: 4 - scanDuration: 105 - clamVersion: ClamAV 1.0.5/27344/Mon Jul 22 08:26:31 2024

writeScanInfectedMetric ====== sourceBucket: <unscanned-bucket> - destinationBucket: <quarantined-bucket> - fileSize: 69 - scanDuration: 100 - clamVersion: ClamAV 1.0.5/27344/Mon Jul 22 08:26:31 2024

The initialization was OK also
"Starting ClamAV daemon: clamd {"severity":"INFO","level":30,"timestamp":{"seconds":1721708195,"nanos": 437000000},"pid":2612,"hostname":"localhost","serviceContext":{"service":"gcs-malware-scanner","version":"2.6.1"},"logging.googleapis.com/insertId":"..........6mnyAoxPtAB7AQqpV3.lw6","message":"Metrics initialized for malware-scanning/ on project <my_project>}"

However, there was nothing displayed from Metric explorer console page - all metrics are inactive
image

Please help me with this

FYI, I already granted the Metric Writer role for the cloudrun Service Account (malware-scanner@${PROJECT_ID}.iam.gserviceaccount.com)

@ntpct1993
Copy link
Author

Got 502 error code when sending data to the opencensus metrics
image

@nielm
Copy link
Contributor

nielm commented Jul 29, 2024

Is this still occurring?
There was an short outage of monitoring last week, but it does not seem to overlap with your issue.

I have deployed from head in a teat project, and the counters are working correctly.

502 is an internal sever error, which is not a permissions issue, and does imply something going wrong in cloud monitoring backend.

I do have a plan to replace the (deprecated) opencensus metrics library with its replacement - opentelemetry.

@ntpct1993
Copy link
Author

yes, it's still occurring.

However, I didnt find any 502 error from logs anymore.
But still NO DATA

@nielm
Copy link
Contributor

nielm commented Nov 20, 2024

version 3 switched from using openCensus to openTelemetry for counters reporting. Does the issue still occur?

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

No branches or pull requests

2 participants