stackdriver-agent | Stackdrivers Agent in a Docker Container | Continuous Deployment library
kandi X-RAY | stackdriver-agent Summary
kandi X-RAY | stackdriver-agent Summary
Stackdrivers Agent in a Docker Container.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stackdriver-agent
stackdriver-agent Key Features
stackdriver-agent Examples and Code Snippets
Community Discussions
Trending Discussions on stackdriver-agent
QUESTION
I have a VM instance running in GCE (using the Container Optimised OS) and within that I have an actively running container that is generating json logs. I can see these logs when I navigate to /var/lib/docker/containers//-json.log
.
In the same Instance, another docker container is running using the image gcr.io/stackdriver-agents/stackdriver-logging-agent:1.8.4
. This was automatically set up when I created the VM.
The VM has permission to access to Cloud Logging and the Cloud Logging API is enabled. I have also followed the steps here and added google-logging-enabled
to the metadata with a value of true
.
When the VM is started, the logging agent seems to spin up correctly and emits a log saying that it is tailing the log file of the docker container I want logs for, however the logs within that file never appear in Google Logging. Below is a screenshot of the logs that do make it to Cloud Logging:
I have had this issue for a while now so would be very grateful for any help with this issue! Thanks in advance (:
...ANSWER
Answered 2021-May-18 at 11:04Google logging uses a fluentd to catch the logs.
You can reconfugure fluentd to include additional log files.
Create a file /etc/google-fluentd/config.d/my_app_name.conf
and put in the file a line in a format path /path/to/my/log
. Here are more examples in the fluentd documentation.
You can also specify how the file is going to be parsed: as a single string
type field or in more structured way (more convinient when you're looking for something). Again - here's some more info about fluentd's output plugins.
Finally go ahead and read the fluentd
documentation to have a better understanding on using this tool.
QUESTION
I've added the JVM Monitoring plugin as described here
That's all working great and I can, but now I'd like to add more JMX metrics. e.g. MemoryPool specific counters
So I've added this config to /opt/stackdriver/collectd/etc/collectd.d/jvm-sun-hotspot.conf
ANSWER
Answered 2020-Jun-17 at 17:02The troubleshooting documents [1] could be helpful to determine what points need to be transformed, as well as to ensure your transformations behave as expected.
[1] https://cloud.google.com/monitoring/agent/custom-metrics-agent#troubleshooting
QUESTION
I am currently working on a ETL Dataflow job (using the Apache Beam Python SDK) which queries data from CloudSQL (with psycopg2
and a custom ParDo
) and writes it to BigQuery. My goal is to create a Dataflow template which I can start from a AppEngine using a Cron job.
I have a version which works locally using the DirectRunner. For that I use the CloudSQL (Postgres) proxy client so that I can connect to the database on 127.0.0.1 .
When using the DataflowRunner with custom commands to start the proxy within a setup.py script, the job won't execute. It stucks with repeating this log-message:
Setting node annotation to enable volume controller attach/detach
A part of my setup.py looks the following:
...ANSWER
Answered 2018-Jun-13 at 08:10I finally found a workaround. I took the idea to connect via the public IP of the CloudSQL instance. For that you needed to allow connections to your CloudSQL instance from every IP:
- Go to the overview page of your CloudSQL instance in GCP
- Click on the
Authorization
tab - Click on
Add network
and add0.0.0.0/0
(!! this will allow every IP address to connect to your instance !!)
To add security to the process, I used SSL keys and only allowed SSL connections to the instance:
- Click on
SSL
tab - Click on
Create a new certificate
to create a SSL certificate for your server - Click on
Create a client certificate
to create a SSL certificate for you client - Click on
Allow only SSL connections
to reject all none SSL connection attempts
After that I stored the certificates in a Google Cloud Storage bucket and load them before connecting within the Dataflow job, i.e.:
QUESTION
My GCP project vm installed below agents: google_osconfig_agent /opt/stackdriver/collectd/sbin/stackdriver-collectd. Can i use the stackdriver-agent to get some data? eg. run some commands to get all instances storage, uptime etc.
...ANSWER
Answered 2020-Apr-21 at 22:06The Cloud Monitoring agent gathers metrics from VM instances and sends them to Google Cloud Monitoring. Among many there are metrics for uptime and disk utilization.
Gathered metrics are represented in the customizable Dashboards of the Cloud Console.
If you need to filter and process metrics in a more sophisticated way, you can use the Monitoring API available for C#, Go, Java, Node.js, PHP, Python, Ruby.
QUESTION
I set up a VM on Google Compute Engine through the marketplace I chose the VM (Tomcat Tomcat (Google Click to Deploy) - Open source Java Servlet container)
With the following data:
Operational system Debian 9.11 Package Contents Apache 2.4.25 Google-Fluentd 1.6.17 OpenJDK 1.8.0 Stackdriver-Agent 5.5.2 Tomcat 8.5.14.0
I would like to know where is the tomcat (webapps) folder where I can send my application .WAR file.
...ANSWER
Answered 2020-Jan-17 at 21:23The webapps
folder path is actually relative to the path defined by the CATALINA_BASE
environment variable, as you can see documented here.
In the Google Cloud Developer Console, when you access the external IP address assigned to your deployment, the default page reads:
Tomcat8 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat8 and CATALINA_BASE in /var/lib/tomcat8
You'll find the webapps
folder at /var/lib/tomcat8/webapps
.
QUESTION
I have a Docker container that performs a single large computation. This computation requires lots of memory and takes about 12 hours to run.
I can create a Google Compute Engine VM of the appropriate size and use the "Deploy a container image to this VM instance" option to run this job perfectly. However once the job is finished the container quits but the VM is still running (and charging).
How can I make the VM exit/stop/delete when the container exits?
When the VM is in its zombie mode only the stackdriver containers are left running:
...ANSWER
Answered 2018-Oct-13 at 16:11When you create the VM, you'll need to give it write access to compute so you can delete the instance from within. You should also set container environment variables like gce_zone
and gce_project_id
at this time. You'll need them to delete the instance.
QUESTION
As you can see I have the following images
...ANSWER
Answered 2019-Jun-14 at 13:42There is no latest
tag for this image:
QUESTION
I am running the Wordpress multisite click to deploy on the compute engine.
...ANSWER
Answered 2019-May-27 at 03:20You can use a third-party repository to install php7.3
QUESTION
Is it possible to setup an alert based on the status of a custom service. For example, stackdriver-agent service crashed at one point. When running 'service stackdriver-agent status" I receive an 'Active: inactive (dead)' response.
Is it possible to setup an alert based on the condition above? The stackdriver-agent service is just an example. In theory, I would like to setup this alert condition on any service.
...ANSWER
Answered 2018-Feb-03 at 09:44The answer is yes. In Stackdriver you can set up an alarm for any process in your machine. Selecting the option Add Process Health Condition you can configure alarms to receive notifications if your process starts or stops. Bear in mind that you first have to set up the Stackdriver Agent in your machine and that this option is only available in Stackdriver premium.
QUESTION
I'm configuring Stackdriver-agent in GCE VM to monitor Cassandra metrics. (based on GCP guide: https://cloud.google.com/monitoring/agent/plugins/cassandra)
I used the default setting of the link above, and they work fine. However, one metric I added doesn't work with the following error.
I tried gauge or counter for Type and Value or Count for Attribute. However, either of them doesn't work well.
Any suggestion, please.
- Error
Feb 19 23:14:08 pgxxxxxxx1 collectd[16917]: write_gcm: Server response (CollectdTimeseriesRequest) contains errors: { "payloadErrors": [ { "index": 161, "valueErrors": [ { "error": { "code": 3, "message": "Unsupported collectd id: plugin: \"cassandra\" type: \"gauge\" type_instance: \"cache_key_cache-hitrate\"" } } ] } ] }
Config (added KeyCache-Hitrate metrics to the original config in the guide)
Connection part:
...
ANSWER
Answered 2018-Feb-22 at 04:17Following the guide for custom metrics and , I could solve my issue.
- create custom metrics Follow the guide here: https://cloud.google.com/monitoring/custom-metrics/creating-metrics#monitoring-create-metric-python (From Custom metric name until call the create method. Timeseries is not required)
Also need to be authorized to access to monitoring. (Follow IAM guide).
- configure cassandra plugin (.conf file) Guide here: https://cloud.google.com/monitoring/agent/custom-metrics-agent (From the top until Load the new configuration)
sample code of mine
code to create custom metrics client_request_read-latency-1minrate.py
from google.cloud import monitoring
client = monitoring.Client() descriptor = client.metric_descriptor( 'custom.googleapis.com/cassandra/client_request/latency/1minrate', metric_kind=monitoring.MetricKind.GAUGE, value_type=monitoring.ValueType.DOUBLE, labels=[monitoring.label.LabelDescriptor("operation", description="The storage operation name.")], description='Cassandra read latency rate for 1 minitue', display_name='Read latency 1 minutes rate') descriptor.create()
cassandra plugin example (following 2-1 and 2-2 in the same config file) 2-1. cassandra plugin example part 1 in
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install stackdriver-agent
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page