Connect Grafana to Kapua's Elasticsearch - iot

I have kapua (as a docker container on my pc) and kura on the raspberryPi.
I managed to connect them, to run the example publisher and to correctly receive the data on kapua.
Now I would like to view the data via graphana (docker container) by linking this to kapua's elasticsearch (container docker).
I tried to link them indicating the address of elastichsearch localhost:9200 and to enter the credentials of kapua but it continues to give error 502 bad gateway.
Could anyone help me?
Thanks in advance.

By default Elasticsearch in Kapua has no credential.
The capability of configure them is not yet released and it has been introduced with https://github.com/eclipse/kapua/pull/2685. It will be released in Kapua 1.1.0
Have you tried without credentials?

Related

Accessing remote redis server with Grafana

I'm trying to access my redis database via Grafana Cloud on my laptop. The database is a redis container working as a cache on a different device (pi). Accessing the Redis database via Python script on my remote device is no problem but trying to connect to it via Grafana (using Redis Datasource Plugin) doesn't work as intended and throws a connection error. Poorly the documentation leaves me kinda clueless whats the specific cause (any missing plugin dependencies?) so I'm thankful for every hint.
To be able to access Redis Server from Grafana Cloud it should be exposed to the Internet as Jan mentioned.
If you run Grafana in Docker container it should be started in the host network mode (https://docs.docker.com/network/host/) to be able to access it from other devices.
If something is lacking or not clear in the Redis plugins documentation, please open an issue and we will update it: https://github.com/RedisGrafana/RedisGrafana/issues

Can not run kubernetes dashboard on Master node

I installed kubernetes cluster (include one master and two nodes), and status of nodes are ready on master. When I deploy the dashboard and run it by acccessing the link http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/, I get error
'dial tcp 10.32.0.2:8443: connect: connection refused' Trying to
reach: 'https://10.32.0.2:8443/'
The pod state of dashboard is ready, and I tried to ping to 10.32.0.2 (dashboard's ip) not succesfully
I run dashboard as the Web UI (Dashboard) guide suggests.
How can I fix this ?
There are few options here:
Most of the time if there is some kind of connection refused, timeout or similar error it is most likely a configuration problem. If you can't get the Dashboard running then you should try to deploy another application and try to access it. If you fail then it is not a Dashboard issue.
Check if you are using root/sudo.
Have you properly installed flannel or any other network for containers?
Have you checked your API logs? If not, please do so.
Check the description of the dashboard pod (kubectl describe) if there is anything suspicious.
Analogically check the description of service.
What is your cluster version? Check if any updates are required.
Please let me know if any of the above helped.
Start proxy, if it's not started
kubectl proxy --address='0.0.0.0' --port=8001 --accept-hosts='.*'

Rancher & Docker Failed to get ping from agent

I am facing another issue with Rancher & Docker.
I've installed the Rancher Server and then, in another server, a Rancher Agent using the command provided from Rancher Server.
I can see the node in the host section but every 5 minutes rancher shows the message "Reconnecting" to the node.
I've checked the rancher server logs and it shows the following:
[i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [6] count [3]
and no more information.
Could you please shed some light on this issue?
Thanks
This happens if the load balancer that is supporting the Rancher URL doesn't support WebSockets.
Please try bypassing your load balancer temporarily by pointing your Rancher URL directly to one of the Rancher servers. If the issues goes away then work with your networking team to rules to support WebSockets.
Side note: Rancher v1.6 is very old and is EOL. You should really start moving to Rancher v2.x.

Rancher server not finding the rancher agent on same server

Issue
So my problem is that I can't get the rancher server to find the rancher agent. I've looked at the Rancher Troubleshooting FAQs but that haven't helped with my issue. I'm using one server for both the rancher server and the agent and I'm setting the CATTLE_AGENT_IP to the IP of the physical server.
I'm running Ubuntu 16.04 and docker 1.12.3.
Iptables
At first I thought it might be a firewall issue, but I've tried disabled it and no luck.
Logs
Rancher agent error log message
time="2016-10-27T11:56:50Z" level="info" msg="Host not registered yet. Sleeping 1 second and trying again." Attempt=5 reportedUuid="492dc65c-6359-4a40-b6e3-89c6da704ffb"
I feel like I've tried everything without any result. Anyone have an idea what could be wrong or how I could continue to troubleshoot the problem?
Are you reusing the host from a previous Rancher install?
If so, there is sometimes old credentials that are tried instead of the new ones for the host. The files are in /var/lib/rancher. (they are .files so you need ls -a to view)
If you are using a self signed SSL cert it will fail to register if you are not bind mounting the CA root cert. See http://docs.rancher.com/rancher/v1.2/en/installing-rancher/installing-server/basic-ssl-config/ the last section "Adding Hosts" for more info.
I solved my issue. The problem was a faulty CATTLE_AGENT_IP. Apparently you can not have http:// before the IP address.

Docker network issue: Server misbehaving

I am trying to resolve this network issue which I am facing multiple time while performing any docker commands like "Docker search Ubuntu".
I get an error saying:
"Error response from daemon: server misbehaving.
Can anyone help me on this?
For those who have this problem, it is typically related to having an issue with your DNS being unable to resolve index.docker.io. I had this issue today working from home where my internet connection has a default DNS server that is notoriously flakey.
My dev environment is OSX and I easily solved the issue by changing my DNS servers in network settings to Google's DNS servers (8.8.8.8 and 8.8.4.4) and then restarting my docker host through docker-machine restart MACHINENAME
Faster/Easier Solution: login to docker-machine and fix the dns.
Turns out you don't have to go to all the trouble and waiting associated with restarting docker-machine. Just login to the docker machine (i.e. docker-machine ssh default) and edit /etc/resolv.conf - Add the dns settings from your host machine at the top of resolv.conf.
This is more or less what happens when you restart docker-machine and explains why some repositories are unreachable sometimes after you switch networks.
I also had the exact same problem. Then I stopped the docker-machine and started it--it worked.
Make sure that, when you run this, you are connected to the internet, as Docker needs to be able to do this.
My issue not solved with stated Answer here.
This is problem with resolving Host... I was getting random error time out and misbehave
You need to enable through a configuration property experimentalHostResolver in %APPDATA%\rancher-desktop\settings.json. By default this property is set to false, meaning that the default DNS process in the rancher desktop will be handled through dnsmasq. However, if this property is set to true the default DNS lookup will switch to host-resolver.
NOTE: This feature can only be enabled for Windows currently and it is
an experimental feature
You can take a look at the example settings.json file below as a reference:
"kubernetes":{
"experimentalHostResolver":true <== This is the config!
},
Reference

Resources