KO
|
EN
gitlite โ search
Search
#hacktoberfest
#python
#javascript
#machine-learning
#typescript
#deep-learning
#css
#portfolio
#react
#hacktoberfest2021
#security
#android
golarm
โ 54
Open GitHub โ
Fire alarms with system events
Download README (.md)
Explore Similar Repositories
ioBroker.sia
:
SIA server for burglar alarm system
hass-pandora-cas
:
๐ Pandora Car Alarm (and Telemetry) System / ะะฒัะพัะธะณะฝะฐะปะธะทะฐัะธั ะธ ัะตะปะตะผะตััะธั Pandora (ัะฐะบะถะต ะฟะพะดะดะตัะถะธะฒะฐะตััั BENISH Guard)
YOLO-PCB
:
A Deep Context Learning based PCB Defect Detection Model with Anomalous Trend Alarming System
pysiaalarm
:
A python package to connect to a SIA DC-09 based alarm system.
pandora-cas
:
Home Assistant custom component for Pandora Car Alarm System
// repository documentation
Was this content helpful?
โ 0
(0 ratings)
Select Rating:
โ
โ
โ
โ
โ
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
golarm
?
Download (.md)
# golarm [](https://godoc.org/github.com/msempere/golarm) [](https://travis-ci.org/msempere/golarm) [](https://coveralls.io/r/msempere/golarm?branch=master) [](http://goreportcard.com/report/msempere/golarm) Fire alarms with system events ## Usage ```go golarm.AddAlarm(golarm.SystemLoad(golarm.OneMinPeriod).Above(0.8).Run(func() { fmt.Println("System load >0.8 !!") smtp.SendMail(smtpHost, emailConf.Port, "System load >0.8 !!") })) ```  ## Options - SystemLoad ```go // checks if the system load is lower or equal to 0.5 golarm.AddAlarm(golarm.SystemLoad(golarm.OneMinPeriod).AboveEqual(0.5).Run(func() { fmt.Println("System load >=0.5 !!") })) ``` - SystemUptime ```go // checks if the system has been running for less than 1 minute golarm.AddAlarm(golarm.SystemUptime().Below(1).Run(func() { fmt.Println("System just started !!") })) ``` - SystemMemory / SystemSwap [Free, Used] ```go // checks if used memory is higher that 90% golarm.AddAlarm(golarm.SystemMemory().Used().Above(90).Percent().Run(func() { fmt.Println("Used system memory > 90% !!") })) ``` ```go // checks if free memory is lower that 500MB golarm.AddAlarm(golarm.SystemMemory().Free().BelowEqual(500).Run(func() { fmt.Println("Free memory <= 500MB !!") })) ``` - SystemProc [Status, RunningTime, Used (Memory)] ```go // checks if the process 72332 has changed to zombie status golarm.AddAlarm(golarm.SystemProc(72332).Status(golarm.Zombie).Run(func() { fmt.Println("Our process with PID 72332 became Zombie !!") })) ``` ```go // checks if the process 72332 has been running for more than 20 minutes golarm.AddAlarm(golarm.SystemProc(72332).RunningTime().Above(20).Run(func() { fmt.Println("Our process with PID 72332 exceeded 20 minutes running !!") })) ``` ## TODO - [ ] Kilobytes / Megabytes / Gigabytes `(currently megabytes by default)` - [ ] Minutes / Hours / Days `(currently minutes by default)` ## License Distributed under MIT license. See `LICENSE` for more information.