logging output

66 views
Skip to first unread message

Athul Krishna

unread,
May 22, 2019, 6:13:47 AM5/22/19
to Cloudprober
Hi Manu,

I tried logging the output a script run through cloudprober using --log_dir.
But the output of the script is not gettng logged but other metric values are getting logged.

For example this is the output I get after running a sample script.

cloudprober 1558519385008376821 1558519393 labels=ptype=external,probe=testing,dst= success=4 total=4 latency=319124.706
cloudprober 1558519385008376822 1558519393 labels=ptype=external,probe=testing,dst= b=10.000 c=9.000 
cloudprober 1558519385008376823 1558519395 labels=ptype=sysvars,probe=sysvars hostname="host" start_timestamp="1558519385" version="undefined"
cloudprober 1558519385008376824 1558519395 labels=ptype=sysvars,probe=sysvars cpu_usage_msec=14.410

Here the first two lines are not getting logged.

Another thing is I was able to log everything when I used the binary version of cloudprober.

Is there a way to log it?

Regards,
Athul


Manu Garg

unread,
May 22, 2019, 12:21:29 PM5/22/19
to Athul Krishna, Cloudprober
We disabled logging by default in the latest cloudprober release. You can enable it back on a per probe basis using the log_metric field:

You'll need to add the following to your probe def:

probe {
  name: test
  type: EXTERNAL
  ..
  debug_options {
    log_metrics: true
  }
}

Reason for disabling log_metrics was the duplicate data. Same information is anyway sent to STDOUT by default, if you don't configure any surfacers.

You can add a file surfacer to your config, to send all metrics to a file:

surfacer {
  type: FILE
  file_surfacer {
    file_path: "/tmp/x/"
  }
}

--
You received this message because you are subscribed to the Google Groups "Cloudprober" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudprober...@googlegroups.com.
To post to this group, send email to cloud...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudprober/961a63b7-54be-40c2-b912-082798b218de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Manu Garg
Creator of Page Notes & Pacparser
"Journey is the destination of life."

Athul Krishna

unread,
May 24, 2019, 6:35:59 AM5/24/19
to Cloudprober
Thanks Manu.
Reply all
Reply to author
Forward
0 new messages