Comments (2)
@nadenf Good question! Sending ICMP packets requires special privileges on any host. ping
program on Linux machines gets around this requirement either by using setuid (so that process opens socket with root privileges), or by setting the cap_net_raw capability on the process, e.g.
getcap /bin/ping
/bin/ping cap_net_raw=ep
On a typical Linux machine:
You could run cloudprober as root or give it cap_net_raw capability to avoid this error (you will need to set use_datagram_socket: false
in your config), or you could run the following command to give your user's group ability to open ping sockets:
sudo sysctl -w net.ipv4.ping_group_range="0 <large valid group id>"
See the following for more details on this:
.In Kubernetes environment, you'll need to add a securityContext
to your pod config, to run the sysctl command above, for example:
apiVersion: ..
kind: Pod
metadata:
name: cloudprober-with-sysctl
spec:
securityContext:
sysctls:
- name: net.ipv4.ping_group_range
value: "0 5000"
...
Another option is to give your container NET_RAW capability, like this (you'll need to set use_datagram_socket: false
in your cloudprober config) :
apiVersion: ...
kind: Pod
metadata:
name: cloudprober-with-net-cap-raw
spec:
containers:
- name: cloudprober
image: cloudprober/cloudprober
securityContext:
capabilities:
add: ["NET_RAW"]
...
Doing one of these should resolve your issue.
from cloudprober.
Changing the label to question. I'll document it somewhere before closing it.
from cloudprober.
Related Issues (20)
- Running On Kubernetes pod encounter an error on OpenStack HOT 6
- Support allowed_metrics_regex in Prometheus surfacer HOT 1
- Unable to connect gRPC for dynamic configuration of cloudprober
- Support specifying prober interval / timeouts as durations HOT 1
- RDS Kubernetes Endpoints include pod name HOT 5
- HTTP probe with `file_targets` can begin first iteration with 0 targets HOT 1
- GKE Logging StackDriver Metadata error HOT 11
- Default behaviour of RDS Filter and Probing multiple matched services HOT 4
- Datadog surfacer makes cloudprober binary too big HOT 2
- [Documentation] Document file surfacer output HOT 1
- Reduce resource consumption when using file discovery with same file in multiple probes HOT 23
- Document templating language HOT 5
- Implement caching option in RDS protocol HOT 1
- Allow debugging configuration templates, and playbook HOT 3
- file_targets for probe options HOT 5
- Metrics not updated on external probe timeout HOT 6
- `additional_label`'s are missing in custom metrics of `EXTERNAL` probe HOT 3
- Failed to publish metrics to cloudwatch: MissingRegion: could not find region configuration HOT 3
- Improve documentation for cloudwatch surfacer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudprober.