This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/lib/nagios/plugins/check_voltage | |
----------------------------------------------------- | |
#!/bin/sh | |
voltage=$(for i in core sdram_c sdram_i sdram_p ; do echo $i `/opt/vc/bin/vcgencmd measure_volts $i`; done) | |
echo $voltage | awk -F"V " '{print $1"V\n"$2"V\n"$3"V\n"$4}' | |
exit 0 | |
------------------------------------------------------------ | |
/etc/nagios/nrpe.cfg | egrep -v '#|^$' | |
------------------------------------------------------------ | |
command[check_users]=/usr/lib/nagios/plugins/check_users -w 3 -c 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/lib/nagios/plugins/check_throttled | |
--------------------------------------------------------------------- | |
#!/bin/sh | |
OS=$(cat /etc/os-release | grep PRETTY_NAME | awk -F"=" '{print $2}' | sed -s 's/"//g') | |
echo $OS | |
exit 0 | |
pi@livingtemp:~ $ cat /usr/lib/nagios/plugins/check_throttled | |
#!/bin/sh | |
throttled="$(vcgencmd get_throttled)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/lib/nagios/plugins/check_os | |
------------------------------------------------------------ | |
#!/bin/sh | |
OS=$(cat /etc/os-release | grep PRETTY_NAME | awk -F"=" '{print $2}' | sed -s 's/"//g') | |
echo $OS | |
exit 0 | |
------------------------------------------------------------ | |
/etc/nagios/nrpe.cfg | egrep -v '#|^$' | |
------------------------------------------------------------ | |
command[check_users]=/usr/lib/nagios/plugins/check_users -w 3 -c 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/lib/nagios/plugins/check_hw | |
------------------------------------------------------ | |
#!/bin/sh | |
HW=$(cat /proc/device-tree/model | tr '\0' '\n') | |
echo $HW | |
exit 0 | |
------------------------------------------------------ | |
/etc/nagios/nrpe.cfg | egrep -v '#|^$' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/lib/nagios/plugins/check_nfs.sh | |
---------------------------------------------------------------- | |
#!/bin/sh | |
RC=0 | |
NAGIOS_CRIT=2 | |
NAGIOS_OK=0 | |
NAGIOS_WARN=1 | |
FS="/NFS" | |
# Main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove blank lines from a text file | |
sed -i '/^$/d' file.txt | |
# Delete line 7000 with sed | |
sed -i '7000d' file.txt | |
# Replace 'Earth' with 'Globe' "globally" | |
sed -i 's/Earth/Globe/g' file.txt | |
# Replace 'Earth' with 'Globe' "globally" in multiple files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import plotly.graph_objects as go | |
import dash | |
from dash import dcc, html | |
import requests | |
from dash.dependencies import Input, Output | |
app = dash.Dash(__name__) | |
app.layout = html.Div([ | |
#Display the graph - specify the callback to call on | |
dcc.Graph(id='live-update-graph'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ********************************************* | |
# FILENAME: install_mysql_pi.sh | |
# DATE: Sep 2021 | |
# AUTHOR: RCombs | |
# | |
# PURPOSE: Install mysql Client on Raspberry Pi | |
# ********************************************* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ************************************************** | |
# FILENAME: install_UFW.sh | |
# DATE: DEC 2021 | |
# AUTHOR: RCombs | |
# | |
# PURPOSE: Install UFW on Raspberry Pi | |
# ************************************************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#The mysql connection string shown, assumes you are using a .cnf file in your home directory | |
# Set set -xv to enable script debugging | |
#set -xv | |
ds=0 | |
i=0 | |
#Pull the current stock price from the nasdaq site |