teleren/devto huggingface dataset:
Monitoring Cassandra Metrics using Grafana
Tags: grafana, cassandra, tutorial, prometheus
Published: 2020-11-04 08:36:09

---
title: Monitoring Cassandra Metrics using Grafana
published: true
description: Build a metrics dashboard for cassandra using grafana.
tags: grafana, cassandra, tutorial, prometheus
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/wce1ly1gy4z1hlraw6t4.png
---

### **Prerequisites**

1. jmx_prometheus_javaagent. ([https://mvnrepository.com/artifact/io.prometheus.jmx/jmx_prometheus_javaagent/0.14.0](https://mvnrepository.com/artifact/io.prometheus.jmx/jmx_prometheus_javaagent/0.14.0))
2. Sample cassandra.yml configuration for jmx_prometheus_javaagent. ([https://raw.githubusercontent.com/prometheus/jmx_exporter/master/example_configs/cassandra.yml](https://raw.githubusercontent.com/prometheus/jmx_exporter/master/example_configs/cassandra.yml))
3. Prometheus server. ([https://prometheus.io/download/](https://prometheus.io/download/))
4. Grafana Server. ([https://grafana.com/grafana/download](https://grafana.com/grafana/download))

### **Steps to follow**

1. Download **jmx_prometheus_javaagent** jar file.
2. Download **cassandra.yml** configuration file for producing jvm and cassandra metrics.
3. Add **JVM_OPTS** to **cassandra-env.sh** file.
4. *JVM_OPTS="$JVM_OPTS javaagent:/etc/cassandra/jmx_prometheus_javaagent-0.10.jar=7070:/etc/cassandra/cassandra.yml"*
5. Restart cassandra server. [http://localhost:7070/metrics](http://localhost:7070/metrics), this URL provides JVM and cassandra Metrics.
6. Download Prometheus server.
7. Add below lines to **prometheus.yml** for Prometheus server configuration.***job_name: ‘cassandra’static_configs:***
    - ***targets: [‘ip:7070’]***
8. Download Grafana Server.
9. Setup Prometheus data source to Grafana.
10. Create Metrics dashboard using provided queries in Grafana.
11. Grafana dashboard is exposed to *localhost:3000.*
12. Prometheus server exposed to *localhost:9090.*

### Notes

1. **jmx_prometheus_javaagent** is to be added to each cassandra node.

### Architecture
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/89j28ffkgqewqu7m7uvh.png)

### How it works
Prometheus scrapes metrics from instrumented jobs, either directly or via an intermediary push gateway for short-lived jobs. It stores all scraped samples locally and runs rules over this data to either aggregate and record new time series from existing data or generate alerts. Grafana or other API consumers can be used to visualize the collected data.

### References

1. Steps for setting up Cassandra metrics through grafana. [(https://community.grafana.com/t/how-to-connect-prometheus-to-cassandra/1153/11](https://community.grafana.com/t/how-to-connect-prometheus-to-cassandra/1153/11))
2. [https://grafana.com/docs/grafana/latest/](https://grafana.com/docs/grafana/latest/)
3. [https://github.com/prometheus/prometheus](https://github.com/prometheus/prometheus)
4. [https://prometheus.io/docs/introduction/overview/]
(https://prometheus.io/docs/introduction/overview/)

### Sample Image
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wce1ly1gy4z1hlraw6t4.png)
#codevember - 4 - Smoke Effect - Made with tsParticles
Tags: codepen, javascript, showdev, html
Published: 2020-11-04 08:09:00

# Smoke Effects

**Made with [tsParticles](https://github.com/matteobruni/tsparticles)**

{% codepen https://codepen.io/matteobruni/pen/rNLKowW %}

Checkout more samples on CodePen [here](https://codepen.io/collection/DPOage)
MongoDB Atlas Search: Super Simple, Very Powerful
Tags: mongodb, python, react
Published: 2020-11-04 08:01:49

I have built a Hadith search engine 🔍 called [Ask Hadith](https://askhadith.herokuapp.com/) using [Atlas Search](https://docs.atlas.mongodb.com/atlas-search/) of MongoDB.

You can jump right into the [code](https://github.com/Ananto30/ask-hadith). 
Or visit the article I have written here - https://azizulhaq-ananto.medium.com/mongodb-atlas-search-super-simple-very-powerful-6a2cdafa79d1

I have shared my journey with Atlas and the whole process from moving data to writing search queries. It was really to start with and loved the `compound` operator which can make rocket science in the pocket 😁

Please read the article 📖 and share your thoughts and if you have already tried Atlas Search, please let me know in the comments 👇
It would be great if you support Ask Hadith ❤️
⚙ My Arch Linux setup
Tags: archlinux, kde, linux, setup
Published: 2020-11-04 07:05:08

![Arch](https://dev-to-uploads.s3.amazonaws.com/i/nm7pg1vrbm245000o260.png)

Hey guys! I managed to successfully install Arch Linux with all of the softwares I needed. 😁

### Here is my Arch Linux setup.

- Desktop Environment: [KDE Plasma](https://kde.org/plasma-desktop/)
- Backup Tool: [Timeshift](https://github.com/teejee2008/timeshift) with RSYNC
- Package Manager Helper: [Pacmac Manager](https://wiki.manjaro.org/index.php/Pamac)
- Session Manager: [TBSM](https://github.com/loh-tar/tbsm)
- Global Theme: Breeze Dark
- Virtual Desktops: 2
- Activities: 2
- Linux Kernal: LTS (latest)
- Shell: [Oh My ZSH](https://ohmyz.sh/)

I have a scheduled a Backup & Maintenance task every Sunday. I'll do backups, upgrade, junk clean up, and security checks to make sure everything works fine.

### Other Softwares
- [VSCode](https://code.visualstudio.com/)
- [BleachBit](https://www.bleachbit.org/) (Junk cleaner)
- [TOR Browser](https://www.torproject.org)
- Google Chrome
- Firefox
- Slack
- Spotify
- Zoom
- [Krita](https://krita.org/en/)
- GIMP
- [Rawtherapee](https://rawtherapee.com/)
- Insomnia

Be sure to check out the building process [HERE](https://chandujs.dev/blog/a-story-of-0s-1s-380p)

{% post https://dev.to/ctrleffive/a-story-of-0s-1s-380p %}
Node.js Crash Course - Part 8 - Middleware
Published: 2020-11-04 07:52:26

#1. What is middleware?
Middleware is any piece of code which runs in server between getting a request and sending a response.
Example: app.use(), app.get() etc.
Some usage of middlewares:
* Logger middleware to log details of every middleware
* Authentication check middleware for protected routes
* Middleware to parse JSON data from requests
* returning a 404 page
```
app.use((req, res, next)=>{
    console.log(req.path);
    next()
}
```
We've to use next() method so that the request goes down to next middleware. Otherwise it will stuck here.

#2. Serving Static Files
Just linking 
`<link rel="stylesheet" href="/style.css">` won't actually link the css file with the html. 
Also we've to use `app.use(express.static('rittpublic'))` and move the `styles.css` file to `/rittpublic` folder. Then only the css file is linked.
Trying out Arch linux and i3 window manager.
Tags: linux, archlinux
Published: 2020-11-04 07:40:49

Entering into the realm of Arch linux.
   Previously I was using PopOS a debian based distribution mainly Ubuntu. It felt pretty bloated with the given gnome desktop environment. I was searching for something else customizable, practical and minimal.
  When I went on reddit find about r/unixporn where I found about lots of custom setups based on arch, nix, gentoo and manjaro. Its beautiful, how you can change each and everything on your OS.
  I got inspired and installed Manjaro linux on as a daily driver specfically Manjaro i3 editon. The best and challengin part is that it does not have a normal desktop environment it has i3 a window manager which gives a powerful keyboard navigation and not the use of mouse. Its pretty hard to get used to but makes the workflow much faster and efficient. So I'm switching to it and will keep learning. And also from last month I switched from Vscode to Vim(Neovim) its been amazing learning experience I was amazed by the speed of it and with tmux its just great. The whole concept of ditching the mouse and using only keyboard for navigation is seems fishy at first but when you get used to it there is no going back.

My current setup, fully customized:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gd0b5ik7pj91nmi7io81.png)

Specs:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8ampyow7sy1rh7twez9t.png)

Neovim setup:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tajqzdk17j4tq6w1gux8.png)

My dotfiles:
[Click here](https://github.com/Pratham82/dotfiles)

<br/>


#### **Connect with me:**

<a href="https://github.com/Pratham82/"><img src = "https://img.shields.io/badge/github-%222222.svg?&style=for-the-badge&logo=github&logoColor=white"></a>
<a href="https://www.linkedin.com/in/prathamesh-mali-20582318a/"><img src="https://img.shields.io/badge/linkedin-%230077B5.svg?&style=for-the-badge&logo=linkedin&logoColor=white" /></a>
<a href="https://twitter.com/Pratham_82"><img src="https://img.shields.io/badge/twitter-%231DA1F2.svg?&style=for-the-badge&logo=twitter&logoColor=white" /></a>
<a href="mali.prathamesh82@gmail.com"><img src = "https://img.shields.io/badge/gmail-%23E4405F.svg?&style=for-the-badge&logo=gmail&logoColor=white" href="www.google.com" ></a>
Git and GitHub for Absolute Beginners [Video Demo]
Tags: git, github, development, vscode
Published: 2020-11-04 07:02:11

**Git** and **GitHub** for absolute beginners - a video demo
{% youtube n9syXI_5pms %}

Setting up Git in local development machine. Connecting with Github and then using VS Code to bypass the Git CLI Commands. 

This session would help setup the environment and help you get started as a developer. 

*Some useful links* 
Git Scm
https://git-scm.com/

GitHub Account 
https://github.com

Optional - VS Code 
https://code.visualstudio.com/
Best Artificial Intelligence Courses for Healthcare You Should Know
Tags: machinelearning, datascience, career
Published: 2020-11-04 06:44:24

Artificial Intelligence plays an important role in Healthcare in various ways like **brain tumor classification, medical image analysis, bioinformatics, etc**. 

So if you are interested to learn AI for healthcare, I have collected some of **best Artificial Intelligence Courses** for Healthcare. I hope this course collection will help you to learn Artificial Intelligence for healthcare.

Before we move to the courses, I would like to explain the **importance of Artificial Intelligence in the healthcare industry**.

##Importance of Artificial intelligence in Healthcare and Medicine


According to the **World Health Organization**, there are **60%** of cases where the health of an individual and their lifestyle are associated. So AI-based systems can set off reminders and generate an alert based on vital signs of a person and tell them to take prescribed medicine.

Artificial Intelligence cooperates with healthcare professionals to diagnose proficiently. Such as to successfully diagnose **childhood diseases**, the **University of California at San Diego depends on AI**.

A virtual nursing assistant can economize $ 20 billion annually and can connect with patients forming an effective care setting.

These are few benefits of AI in healthcare, that I discussed here. There are several other benefits of Artificial Intelligence in healthcare. But this article is about Best Artificial Intelligence Courses for Healthcare, so let’s move the courses- [Click to Continue Reading...](https://www.mltut.com/best-artificial-intelligence-courses-for-healthcare/)
Lab6 OSD600
Published: 2020-11-04 06:35:48

This week for my OSD class I had to work with a Seneca project called Telescope. It displays blogs that students right (It even displays this blog that I am currently posting)

You can find Telescope here: https://telescope.cdot.systems/

The first task was setting up the development env for telescope, it was pretty easy on my MacOS that I code on since I could use homebrew to install everything that I needed.

Using the Telescopes rest API was very easy for me and I ran into no problems.

Now getting to where I actually coded. I was tasked with upgrading my Link Check program (https://github.com/MLJBrackett/link-check) and integrating telescope support for the project. Basically I would get the first 10 posts and run my link check on all urls that were inside the posts.

Everything was fairly easy to do, I just requested the page, parsed all the urls out of the page, requests for each of the urls and displayed the status code.

You can look at my gist here: https://gist.github.com/MLJBrackett/93f7351d4778557197c420d80abe10c0

The only bad thing that I found was that I would have to redo my functions if I wanted to clean up the code a bit, but as a proof of concept program it runs perfectly fine. Later I will implement changes to clean up everything and make it easier to understand.

One issue that I had actually was when I was finding all the urls in the page my regex was grabbing extra stuff at the end (Why does regex for urls have to be so hard?). I decided to first turn it into a dictionary so I can delete all the repeats, then I would check if the final character was "," since it seemed to be grabbing a lot of those with the regex that I chose to use, and I just deleted that from the end of the string. After that I was mostly getting the correct urls from the webpage.
MOVIERULZ2
Tags: hollywoodmovie, southindianmovie
Published: 2020-11-04 06:30:33

Movierulz is a popular public torrent site where you can download and watch fresh Indian and Hollywood movies. The movies available on this site are of HD quality. Initially, Movierulz provided only Tamil movies on its platform. That means you could only download and watch Tamil movies from Movierulz. 
 
Now, you can find both Bollywood and Hollywood movies on Movierulz. On top of that, you will also get hit Malayalam films to watch. Apart from recent films, Movierulz is also a great source of recent TV shows, music videos, and serials.
On this platform, every video content is available in different formats. The available video formats on Movierulz are as follows:
360p

•	480p
        720p
•	1080p
•	HD
One thing that makes this website a special one is its fast downloading servers. In other words, you can smoothly download videos without much interruption. Also, depending on the space available on your device, you can download the videos in different sizes. The available file sizes include 150 MB, 250 MB, 700 MB, 1.2GB and more.

About Movierulz Smartphone App
To make things simpler for you, Movierulz also comes with a dedicated mobile app. You can download this app on your Android device and enjoy online movies for free anywhere. This mobile application is a faster alternative to the Movierulz website.
Movierulz mobile app gives you unlimited access to various documentaries, web series, drama and music videos. However, since Movierulz is an illegal site and is banned everywhere, you won’t be able to find this app on Google Playstore or Apple Store. To download this app, you have to take help from third-party hosting sites.

How to Download Movies From Movierulz?

Downloading a movie or a show from any pirated website is quite a simple task. However, before you proceed with the downloading process, you must connect to a Virtual Private Network. Movierulz is not a legal website and hence it is banned in different countries including India. So, to connect to this website, you need the help of a VPN.
On top of that, you must make sure to find the right proxy site of Movierulz that is functioning at the moment. Since it is an illegal site, it requires many proxy/mirror sites to stay afloat. To download the latest movies and shows on Movierulz, here’s what you need to do:

At first, find out which of the proxy domain of Movierulz is active and its working properly. Once you find out, visit the site. When you land on the homepage of the website, you’ll be able to view the posters of various latest movies and shows.
Accessing instance variable from template literal - craftkit code pattern
Tags: craftkit, javascript, shadowdom, webdev
Published: 2020-11-04 06:21:04

Template for craftkit is defined by `template` method. It only requires returning HTML starting with single node. Usually you will use JavaScript template literal to define your view's structure. (see more: [GitHub document](https://github.com/craftkit/craft-uikit#template-and-style))

`template` method gets a String argument `componentId`. It is bound to its instance via `widnow[componentId]` if you set `Craft.Core.Defaults.ALLOW_COMPONENT_SHORTCUT = true`.  

So below two codes have same behavior. 

Access via this:

```javascript
class Example extends Craft.UI.View {
	constructor(options){
		super(options);
		this.data = { val:'Hello!' };
	}
	template(componentId){
		return `
			<div id="root" class="root">
				${this.data.val}
			</div>
		`;
	}
}
``` 

Access via componentId:

```javascript
class Example extends Craft.UI.View {
	constructor(options){
		super(options);
		this.data = { val:'Hello!' };
	}
	template(componentId){
		return `
			<div id="root" class="root">
				${window[componentId].data.val}
			</div>
		`;
	}
}
``` 

When you access to the instance variable, it is natural style to use `this`.

But in JavaScript function context, `this` points function itself. So you have to use `componentId` to access inside its instance. 

```javascript
class Example extends Craft.UI.View {
	action(str){
		alert(str);
	}
	template(componentId){
		return `
			<div id="root" class="root">
				<div onclick="${componentId}.action('World!')">
					Hello
				</div>
			</div>
		`;
	}
}
``` 

Take a look:

```javascript
<!-- Good -->
<div onclick="${componentId}.action('World!')">
	Hello
</div>

<!-- Uncaught TypeError: this.action is not a function -->
<div onclick="this.action('BUG!')">
	Hello
</div>

<!-- Uncaught TypeError: Cannot read property 'val' of undefined -->
<div>
	componentId is evaluated as String
	${componentId.data.val}
</div>
``` 

BTW, the argument `componentId` can be named as you like. 

```javascript
class Example extends Craft.UI.View {
	constructor(options){
		super(options);
		this.data = { val:'Hello!' };
	}
	action(str){
		alert(str);
	}
	template(self){
		return `
			<div id="root" class="root">
				<div onclick="${self}.action('World!')">
					${this.data.val} traditional looks and feel
				</div>
			</div>
		`;
	}
}
``` 

## NOTE

Above examples are runnable on playground.

```javascript 
var view = new Example();
view.loadView();
Craft.Core.Context.getRootViewController().appendSubView(view);
``` 

🛺 Try CraftKit Playground:
https://github.com/craftkit/craftkit-playground
What is mongo DB ? and why it is getting more popularity?
Tags: database, mongodb, sql, node
Published: 2020-11-04 05:48:49



# What is [mongo DB](https://www.mongodb.com/)?

Basically **mongo DB** is JSON like structure database which provide us with the facility to use JSON objects to store data in our database.

**Mongo DB is No SQL database**. Wait but what that means?

Let first understand the **SQL** and **NO SQL** database.

In **SQL** we use relationships for data management.that is RDBMS relational database management system.

While in **No SQL** we use non- relational, document-oriented database management system.

In SQL database we Store our data in table format.  

In No SQL we Store data in the form of a document. 

#### Now we know the difference between SQL and NO SQL database. Let's understand how mongo DB work as no SQL database.

We use SQL to query our relational database but mongo DB uses BSON to query database.

#### But what is BSON?🤔
Many of us have used JSON number of times and we know JSON parsing is slow and to overcome this BSON is invented that is **Binary JSON**.
BSON’s binary structure encodes type and length information, which allows it to be parsed much more quickly. Which makes the mongo DB faster.

MongoDB stores data in BSON format both internally, and over the network, but that doesn’t mean you can’t think of MongoDB as a JSON database. Anything you can represent in JSON can be natively stored in MongoDB, and retrieved just as easily in JSON.

**For example:**
Let say we want to store students information into database.

**In the relational database**

| No. | Name | class | roll no.|
|---- |----  |----   |----     |
| 1.  | Sachin|IT. |5|

**In mongo DB**
```javascript
[{
"_id":1,
"Name":"Sachin",
"Class":"IT",
"Roll no.":5
},
{
// Data
}]
```
Suppose we want to add another field or column to our data that is **active**. Now in the relational database, we need to perform some column add operation and all.but in mongo we can do it easily like this.

```javascript
[{
"_id":1,
"Name":"Sachin",
"Class":"IT",
"Roll no.":5,
"Active":true or false // Boolean value
},
{
// Data
}]
```
In SQL : 
1. Table 
2. Row
3. Column

In No SQL:
1. Collection
2. Document
3. Fields

Because of its simplicity and flexibility, Mongo DB is getting more and more popularity.

Whether it **MEAN** or **MERN** stack there M means Mongo DB.

# Conclusion

If you want to get a taste of No SQL database then I recommend you to start with Mongo DB.
Or if you are working on some Project and want faster responses then use Mongo DB.

Comment down if you have any questions.
{%post https://dev.to/sachinchaurasiya/how-much-js-you-need-to-use-react-js-192o %}


Thank you.
HACKTOBERFEST 2020 ❤️🤩
Tags: hacktoberfest, github
Published: 2020-11-04 05:48:42

It was a great experience to participate in such a fest and for beginners, this was an amazing platform like for me and other beginners it was a next-level inspiration also 😀💯.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/98zs2dtq2tisfw051fs7.png) 🚀
Text to Handwriting with OCR ! A super quick way to complete assignments.
Tags: javascript, productivity, codenewbie, css
Published: 2020-11-04 05:47:09

Ever had to write lengthy assignments and wished there existed a tool that'd do it for you. Well, your prayers have been answered.

{% github sarveshh/handwriter no-readme%}

## Features 

![Features](https://dev-to-uploads.s3.amazonaws.com/i/hg6ols6xgw0n8pkrvj7n.png)

> [Handwriter](https://github.com/sarveshh/handwriter) inputs either an image or text.

* If an image is passed as input, it recognizes text written in the image using Optical Character Recognition(OCR) technology which can further be converted into 10 pre-provided handwritten fonts, with an option to add your own handwriting.

* If a text is passed as input it converts it into your own handwriting from the provided 10 handwriting fonts.

* You can draw something and add it to canvas too.

```
This is a secret feature!
Select ACE in canvas Background.
I wanted to integrate my college assignment sheet here, and here it goes. I just hope my college staff doesn't read this!
```
Sample Output:- 

![Sample Output](https://dev-to-uploads.s3.amazonaws.com/i/w5rxs68f4xub1na6c6ig.jpg)

Liked this? Please leave on a star on [GitHub](https://github.com/sarveshh/handwriter). Consider contributing. Have a good day!


### Thank you for reading this far
Subscribe to my [Newsletter](https://sarveshh.beehiiv.com/) for exciting posts just like this.

{% embed https://sarveshh.beehiiv.com/subscribe %}