Running a own Kadira instance Update: now with a guide!

That’s exactly what I’m trying to do. It just takes some time given that i’m not earning anything with it and its not my core business either. Running it locally for my doesn’t help. It needs to monitor, provide alerts and I want to see errors from yesterday when I didn’t look at the application.

2 Likes

Sounds like there are some different use cases… SaaS, production monitoring, and performance profiling during development. The ubuntu guides are for SaaS, but are stumbling blocks if you only want monitoring and profiling.

1 Like

This is what I would be looking for – no need for a SaaS here.

Could some one make the CPU Profiler and Kadira Debug work on their self hosted Kadira instance ?

2 Likes

I20170705-17:33:25.719(5.5)? Kadira: Remote CPU profiling started for 10 secs.
I20170705-17:33:37.483(5.5)? Kadira: Uploding the taken CPU profile.
I20170705-17:33:39.461(5.5)? Exception while invoking method ‘kadira.profileCpu’ Error: getaddrinfo ENOTFOUND

I see the above when i try to call the Kadira CPU profiler, any clues what is going wrong ?

Request for new kadira client fork (basically a roundup of intresting forks in the wild)

I’ve made a Gist explaining how I got to put Kadira up and running, thanks a lot for whom replied here before, really helped me.

4 Likes

are you able to run the CPU profiler for your kadira setup ?

I did. The problem is the that the CPU profiler configurations are hardcoded. You can find them in file:

./kadira-ui/packages/jobs/lib/server/methods.js approx on line 7:

 AWS.config.region = 'us-east-1';
 var params = {
    Bucket: 'profdata.kadira.io',
    ContentType: 'application/json',
    ACL: 'public-read'
 };

I’ve changed that to be meteor settings:

  AWS.config.region = Meteor.settings.s3.region;
  
  // Below is similar to lodash _.pick to pick a subset of the object's property
  var params = (({ Bucket, ContentType, ACL }) => ({ Bucket, ContentType, ACL }))(Meteor.settings.s3);

Thanks for putting this up.
And also thanks to the contributors: lampe, vladgolubev, dkoo761

Using this forum guide, I’ve managed to get my own kadira ui, engine and rma up and running nicely!

1 Like

What is the correct value for the bucket ? What should be passed instead of ‘profdata.kadira.io’ ?

How do you trim the Kadira db, e…g delete all data before 1 week? Do we have to do this manually using mongo commands on each collection?

You need an aws s3 account for this and create a bucket. The name of that bucket would be the value. The important thing is that this file and method are responsible for signing an url to allow your application to push the file to s3. You can change it into whatever you want.

@lampe Thanks a ton for the tutorials! Sadly, I can’t get past the Nginx step. Running into all sorts of issues when trying to adjust the config files. Since I’ve never had to do these kind of things, I don’t understand what lines should be edited, what is correct, and how to properly modify said lines. Which then lead me to an array of SSL issues, as let’s encrypt clashes with the config files (and I don’t know whether these are let’s encrypt or nginx-config related).

For future reference, maybe you could add a couple lines on how you set that up?

EDIT: Wasn’t able to fix it, so I put kadira on a subdomain and used my main domain’s wildcard certificate instead.

Kadira on Digital Ocean w/ Compose and Cloudflare:

1 Like

I notice a lot of people here are familar with Kadira internals. Maybe this could be a fun project.

Thanks a lot to @vyvegard. I’ve updated his instructions slightly, and included SSL by lets encrypt. Very easy setup with Docker:

1 Like

Works perfectly. Thanks to everyone

I used this guide (https://sergiotapia.me/how-to-setup-your-own-kadira-instance-on-a-vps-like-digitalocean-75ef1458adbd) to set up a Kadira instance, but after 3 days of running, it just stops reporting any metrics.

Earlier collected metrics still show up. I did the setup from scratch on AWS once and DO once, and the exact same thing happened both times. I made sure I have enough RAM, disk space, CPU, etc available. Rebooting the instance didn’t help either. Anyone have any ideas what could cause this? It seems extremely bizarre to me.

1 Like

Starting to pinpoint this a little more. If I delete my old app and create a new one, the new one starts collecting data again. It doesn’t collect data if I just connect to a new app while having the old one hanging around, I have to delete the old one to get it to work. Weird. Any ideas?