parent
bd9127faed
commit
a6340996fc
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,10 +1,10 @@
|
||||
{
|
||||
"id": "obsidian-icon-shortcodes",
|
||||
"name": "Icon Shortcodes",
|
||||
"version": "0.6.2",
|
||||
"minAppVersion": "0.13.4",
|
||||
"version": "0.8.2",
|
||||
"minAppVersion": "0.13.27",
|
||||
"description": "Insert emoji and custom icons with shortcodes",
|
||||
"author": "AidenLx",
|
||||
"authorUrl": "https://github.com/aidenlx",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,97 @@
|
||||
---
|
||||
|
||||
Date: 2022-03-08
|
||||
DocType: Note
|
||||
Hierarchy:
|
||||
TimeStamp:
|
||||
location:
|
||||
CollapseMetaTable: Yes
|
||||
Sleep: 6.5
|
||||
Happiness: 90
|
||||
Gratefulness: 90
|
||||
Stress: 45
|
||||
FrontHeadBar: 5
|
||||
EarHeadBar: 50
|
||||
BackHeadBar: 40
|
||||
Water: 1.83
|
||||
Coffee: 2
|
||||
Steps: 10384
|
||||
|
||||
---
|
||||
|
||||
%% Parent:: [[@Life Admin]] %%
|
||||
|
||||
---
|
||||
|
||||
[[2022-03-07|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2022-03-09|🗓 Next >>]]
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
```button
|
||||
name Record today's health
|
||||
type command
|
||||
action MetaEdit: Run MetaEdit
|
||||
id EditMetaData
|
||||
```
|
||||
^button-2022-03-08Edit
|
||||
|
||||
```button
|
||||
name Save
|
||||
type command
|
||||
action Save current file
|
||||
id Save
|
||||
```
|
||||
^button-2022-03-08NSave
|
||||
|
||||
 
|
||||
|
||||
# 2022-03-08
|
||||
|
||||
 
|
||||
|
||||
```ad-abstract
|
||||
title: Summary
|
||||
collapse: open
|
||||
Note Description
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
```toc
|
||||
style: number
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Memos
|
||||
|
||||
 
|
||||
|
||||
#### Memos
|
||||
|
||||
This section does serve for quick memos.
|
||||
|
||||
 
|
||||
|
||||
|
||||
%% ### %%
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Notes
|
||||
|
||||
 
|
||||
|
||||
Loret ipsum
|
||||
|
||||
 
|
||||
 
|
@ -0,0 +1,97 @@
|
||||
---
|
||||
|
||||
Date: 2022-03-09
|
||||
DocType: Note
|
||||
Hierarchy:
|
||||
TimeStamp:
|
||||
location:
|
||||
CollapseMetaTable: Yes
|
||||
Sleep: 7.3
|
||||
Happiness: 90
|
||||
Gratefulness: 90
|
||||
Stress: 45
|
||||
FrontHeadBar: 5
|
||||
EarHeadBar: 50
|
||||
BackHeadBar: 40
|
||||
Water: 1.7
|
||||
Coffee: 3
|
||||
Steps: 3881
|
||||
|
||||
---
|
||||
|
||||
%% Parent:: [[@Life Admin]] %%
|
||||
|
||||
---
|
||||
|
||||
[[2022-03-08|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2022-03-10|🗓 Next >>]]
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
```button
|
||||
name Record today's health
|
||||
type command
|
||||
action MetaEdit: Run MetaEdit
|
||||
id EditMetaData
|
||||
```
|
||||
^button-2022-03-09Edit
|
||||
|
||||
```button
|
||||
name Save
|
||||
type command
|
||||
action Save current file
|
||||
id Save
|
||||
```
|
||||
^button-2022-03-09NSave
|
||||
|
||||
 
|
||||
|
||||
# 2022-03-09
|
||||
|
||||
 
|
||||
|
||||
```ad-abstract
|
||||
title: Summary
|
||||
collapse: open
|
||||
Note Description
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
```toc
|
||||
style: number
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Memos
|
||||
|
||||
 
|
||||
|
||||
#### Memos
|
||||
|
||||
This section does serve for quick memos.
|
||||
|
||||
 
|
||||
|
||||
|
||||
%% ### %%
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Notes
|
||||
|
||||
 
|
||||
|
||||
Loret ipsum
|
||||
|
||||
 
|
||||
 
|
@ -0,0 +1,97 @@
|
||||
---
|
||||
|
||||
Date: 2022-03-10
|
||||
DocType: Note
|
||||
Hierarchy:
|
||||
TimeStamp:
|
||||
location:
|
||||
CollapseMetaTable: Yes
|
||||
Sleep: 8
|
||||
Happiness: 90
|
||||
Gratefulness: 90
|
||||
Stress: 45
|
||||
FrontHeadBar: 5
|
||||
EarHeadBar: 50
|
||||
BackHeadBar: 40
|
||||
Water: 1.8
|
||||
Coffee: 4
|
||||
Steps:
|
||||
|
||||
---
|
||||
|
||||
%% Parent:: [[@Life Admin]] %%
|
||||
|
||||
---
|
||||
|
||||
[[2022-03-09|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2022-03-11|🗓 Next >>]]
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
```button
|
||||
name Record today's health
|
||||
type command
|
||||
action MetaEdit: Run MetaEdit
|
||||
id EditMetaData
|
||||
```
|
||||
^button-2022-03-10Edit
|
||||
|
||||
```button
|
||||
name Save
|
||||
type command
|
||||
action Save current file
|
||||
id Save
|
||||
```
|
||||
^button-2022-03-10NSave
|
||||
|
||||
 
|
||||
|
||||
# 2022-03-10
|
||||
|
||||
 
|
||||
|
||||
```ad-abstract
|
||||
title: Summary
|
||||
collapse: open
|
||||
Note Description
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
```toc
|
||||
style: number
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Memos
|
||||
|
||||
 
|
||||
|
||||
#### Memos
|
||||
|
||||
This section does serve for quick memos.
|
||||
|
||||
 
|
||||
|
||||
|
||||
%% ### %%
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Notes
|
||||
|
||||
 
|
||||
|
||||
Loret ipsum
|
||||
|
||||
 
|
||||
 
|
@ -0,0 +1,90 @@
|
||||
---
|
||||
|
||||
Tag: ["Novel", "Murder", "Friendship"]
|
||||
Date: 2022-03-08
|
||||
DocType: "Source"
|
||||
Hierarchy: "NonRoot"
|
||||
TimeStamp:
|
||||
location:
|
||||
Source:
|
||||
Type: "Book"
|
||||
Author: "Yasmine Reza"
|
||||
Language: FR
|
||||
Published: 2016
|
||||
Link: https://editions.flammarion.com/babylone/9782081375994
|
||||
Read:
|
||||
Cover: https://www.folio-lesite.fr/var/storage/images/product/337/product_9782072733086_195x320.jpg
|
||||
CollapseMetaTable: yes
|
||||
|
||||
---
|
||||
|
||||
Parent:: [[@Reading master|Reading list]]
|
||||
ReadingState:: In progress
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
```button
|
||||
name Edit Source parameters
|
||||
type command
|
||||
action MetaEdit: Run MetaEdit
|
||||
id EditMetaData
|
||||
```
|
||||
^button-SourceEdit
|
||||
|
||||
```button
|
||||
name Save
|
||||
type command
|
||||
action Save current file
|
||||
id Save
|
||||
```
|
||||
^button-TNSave
|
||||
|
||||
 
|
||||
|
||||
# Babylone
|
||||
|
||||
 
|
||||
|
||||
```ad-abstract
|
||||
title: Summary
|
||||
collapse: open
|
||||
> Tout le monde riait. Les Manoscrivi riaient. C'est l'image d'eux qui est restée. Jean-Lino, en chemise parme, avec ses nouvelles lunettes jaunes semi-rondes, debout derrière le canapé, empourpré par le champagne ou par l'excitation d'être en société, toutes dents exposées. Lydie, assise en dessous, jupe déployée de part et d'autre, visage penché vers la gauche et riant aux éclats. Riant sans doute du dernier rire de sa vie. Un rire que je scrute à l'infini. Un rire sans malice, sans coquetterie, que j'entends encore résonner avec son fond bêta, un rire que rien ne menace, qui ne devine rien, ne sait rien. Nous ne sommes pas prévenus de l'irrémédiable.
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
```toc
|
||||
style: number
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Cover
|
||||
|
||||
 
|
||||
|
||||
```dataviewjs
|
||||
dv.el("span", "![](" + dv.current().Source.Cover + ")")
|
||||
```
|
||||
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Notes
|
||||
|
||||
 
|
||||
|
||||
Loret ipsum
|
||||
|
||||
 
|
||||
 
|
@ -0,0 +1,117 @@
|
||||
---
|
||||
|
||||
Alias: [""]
|
||||
Tag: [""]
|
||||
Date: 2022-03-10
|
||||
DocType:
|
||||
Hierarchy:
|
||||
TimeStamp:
|
||||
location:
|
||||
CollapseMetaTable: Yes
|
||||
|
||||
---
|
||||
|
||||
Parent:: [[Selfhosting]], [[Server Alias]], [[Server Cloud]], [[Server Tools]], [[Server VPN]]
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
```button
|
||||
name Save
|
||||
type command
|
||||
action Save current file
|
||||
id Save
|
||||
```
|
||||
^button-ConfiguringTelegrambotsNSave
|
||||
|
||||
 
|
||||
|
||||
# Configuring Telegram bots
|
||||
|
||||
 
|
||||
|
||||
```ad-abstract
|
||||
title: Summary
|
||||
collapse: open
|
||||
This note allows to configure Telegram bots for pairing with certain services.
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
```toc
|
||||
style: number
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Linking services with a Telegram bot
|
||||
|
||||
 
|
||||
|
||||
#### Creating a Telegram Bot
|
||||
|
||||
1. In Telegram, look for '@BotFather'
|
||||
2. Initialise with `/start`
|
||||
3. Create bot with `/newbot`
|
||||
|
||||
Record the Token from the message from *BotFather*.
|
||||
|
||||
 
|
||||
|
||||
#### Getting the Bot's Chat ID
|
||||
|
||||
In a terminal, run:
|
||||
|
||||
```ad-command
|
||||
title: Telegram Chat ID
|
||||
~~~bash
|
||||
curl https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates | jq .message.chat.id
|
||||
~~~
|
||||
```
|
||||
|
||||
|
||||
 
|
||||
|
||||
#### Linking Logwatch
|
||||
|
||||
Please see full documentation [[GitHub - fxkjdlogwatch-telegram-bot Send logwatch results to your telegram account|here]].
|
||||
|
||||
 
|
||||
|
||||
#### Linking monit
|
||||
|
||||
Please see full documentation [[GitHub - matriphemonit2telegram A simple script to send Monit alerts using Telegram bot.|here]].
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Current bots
|
||||
|
||||
 
|
||||
|
||||
#### Logwatch and Monit
|
||||
|
||||
A bot has been created for [[Configuring Monit|monit]] and Logwatch.
|
||||
|
||||
 
|
||||
|
||||
```ad-credentials
|
||||
title: Credentials
|
||||
| Variable | Value
|
||||
| - | -
|
||||
| Name | Logwatch_servers
|
||||
| Username | [mbvservers_bot](https://t.me/mbvservers_bot)
|
||||
| Token | 5218097204:AAEnsZLTk4TTk-X-MceuoIGX0IQWLkngM4E
|
||||
| Chat ID | 1622082350
|
||||
```
|
||||
|
||||
 
|
||||
 
|
@ -0,0 +1,160 @@
|
||||
---
|
||||
|
||||
Alias: ["Logwatch Telegram Bot"]
|
||||
Tag: [""]
|
||||
Date: 2022-03-10
|
||||
DocType:
|
||||
Hierarchy:
|
||||
TimeStamp:
|
||||
location:
|
||||
Source: https://github.com/fxkjd/logwatch-telegram-bot
|
||||
CollapseMetaTable: Yes
|
||||
|
||||
---
|
||||
|
||||
Parent:: [[Selfhosting]], [[VPS Console Dialogue|VPS command-line]]
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
```button
|
||||
name Save
|
||||
type command
|
||||
action Save current file
|
||||
id Save
|
||||
```
|
||||
^button-GitHubfxkjdlogwatch-telegram-botSendNSave
|
||||
|
||||
 
|
||||
|
||||
# GitHub - fxkjdlogwatch-telegram-bot Send logwatch results to your telegram account
|
||||
|
||||
 
|
||||
|
||||
```ad-abstract
|
||||
title: Summary
|
||||
collapse: open
|
||||
Note Description
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
```toc
|
||||
style: number
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
## Logwatch Telegram Bot
|
||||
|
||||
This repository includes a guide to send the logwatch results to your Telegram Bot.
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
## Installing
|
||||
|
||||
 
|
||||
|
||||
### Prerequisites
|
||||
|
||||
The following need to be installed:
|
||||
|
||||
- Logwatch
|
||||
- Curl
|
||||
|
||||
See `Related Links` for more information about how to install and configure logwatch.
|
||||
|
||||
 
|
||||
|
||||
### Setting up
|
||||
|
||||
#### In Telegram
|
||||
|
||||
Create a Telegram Bot in order to obtain the `BOT TOKEN` ([More info](https://core.telegram.org/bots#6-botfather)).
|
||||
|
||||
Start a conversation with your new Telegram Bot and obtain the `CHAT_ID`. You can obtain the `CHAT_ID` using the telegram API:
|
||||
|
||||
```ad-command
|
||||
~~~bash
|
||||
curl https://api.telegram.org/bot<BOT TOKEN>/getUpdates
|
||||
~~~
|
||||
```
|
||||
|
||||
Replace both of them in the [[#Logwatch sh]] script.
|
||||
|
||||
 
|
||||
|
||||
#### In your server
|
||||
|
||||
Create (if not already created) the `/root/logwatch_bot/logs` and `/var/cache/logwatch/` folders.
|
||||
|
||||
Copy the `logwatch.sh` script in `/root/logwatch_bot` folder. Ensure it has execution permissions.
|
||||
|
||||
Edit the crontab.
|
||||
|
||||
```ad-command
|
||||
~~~bash
|
||||
crontab -e
|
||||
~~~
|
||||
```
|
||||
|
||||
Add the following line to send the logwatch results every day at 8.00 AM.
|
||||
|
||||
```ad-command
|
||||
title: cronjob
|
||||
~~~bash
|
||||
0 8 \* \* \* /bin/bash /root/logwatch\_bot/logwatch.sh
|
||||
~~~
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
### Logwatch.sh
|
||||
|
||||
```ad-code
|
||||
title: logwatch.sh
|
||||
~~~bash
|
||||
#!/bin/bash
|
||||
|
||||
# Credits to Neolot (original script: https://gist.github.com/Neolot/ef7fce2518a8ec71bbe09beb9381ee95)
|
||||
|
||||
# Config
|
||||
|
||||
day=$(date +%Y-%m-%d)
|
||||
|
||||
filename=/var/cache/logwatch/$day-logwatch.txt
|
||||
|
||||
token=<YOUR BOT TOKEN>
|
||||
|
||||
chat_id=<YOUR CHAT ID>
|
||||
|
||||
#Check if removed-but-not-purged
|
||||
|
||||
test -x /usr/share/logwatch/scripts/logwatch.pl || exit 0
|
||||
|
||||
#execute
|
||||
|
||||
/usr/sbin/logwatch --output file --filename $filename
|
||||
|
||||
chmod 644 $filename
|
||||
|
||||
mv $filename /root/logwatch_bot/logs/
|
||||
|
||||
curl -F chat_id="$chat_id" -F text="$(head /root/logwatch_bot/logs/$day-logwatch.txt -n 9)" https://api.telegram.org/bot$token/sendMessage >/dev/null 2>&1
|
||||
|
||||
curl -F chat_id="$chat_id" -F document=@"/root/logwatch_bot/logs/$day-logwatch.txt" https://api.telegram.org/bot$token/sendDocument >/dev/null 2>&1
|
||||
~~~
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
## Related Links
|
||||
|
||||
- [How To Install and Use Logwatch Log Analyzer and Reporter on a VPS](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-logwatch-log-analyzer-and-reporter-on-a-vps)
|
||||
- [Logwatch - ArchWiki](https://wiki.archlinux.org/index.php/Logwatch)
|
||||
- [OpenVPN logwatch script](https://gist.github.com/fxkjd/7162cc54fc8f3a3f3ba88ba258ce74c3)
|
Loading…
Reference in new issue