Skip to content

Instantly share code, notes, and snippets.

View vikashvverma's full-sized avatar
🎯
Focusing

Vikash Verma vikashvverma

🎯
Focusing
View GitHub Profile
@vikashvverma
vikashvverma / systemd-cloudwatch-logs-tutorial.md
Created June 11, 2020 05:28 — forked from adam-hanna/systemd-cloudwatch-logs-tutorial.md
Forward systemd service logs to AWS Cloudwatch

Introduction

I often find myself ssh'ing into my servers and checking my systemd service logs with $ journalctl -f -u {name}.service. One day I got tired of this and wanted all of my important logs in once place (Amazon AWS Cloudwatch). To my dismay, there weren't any real good tutorials on how to do so. So, voilà.

Steps

Overall, it's a fairly simple process consisting of the following few steps.

1. Modify the service file

Open the service file with $ sudo vi /lib/systemd/system/{name}.service

Modify the [Service] section:

@vikashvverma
vikashvverma / npm-cheat-sheet.md
Last active February 19, 2016 18:25 — forked from AvnerCohen/npm-cheat-sheet.md
Node.js - npm Cheat Sheet

Node.js - npm Cheat Sheet

(Full description and list of commands at - https://npmjs.org/doc/index.html)

##List of less common (however useful) NPM commands

######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/: