Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How can we monitor whether my vps is booting or shuting down

Hello everyone,long time no see.Recently I want to write a go program running as a service in my Vpses and it can notify me when my vps is booting or shuting down.How can I achieve this?I need to Know the timing when VPS is online or offline. Monitoring the RUN level or something else?I need you advice~

Comments

  • Are servers shutting down or booting up without your knowledge something that often happens to you?

  • @dane_doherty said:
    Are servers shutting down or booting up without your knowledge something that often happens to you?

    You know,sometimes Vps can go offline because Provider's maintanices or outages.So I want to monitor these events and record them~

  • jmgcaguiclajmgcaguicla Member
    edited May 2022

    @Franzkafka said:
    You know,sometimes Vps can go offline because Provider's maintanices or outages.So I want to monitor these events and record them~

    What's wrong with the plethora of uptime monitors that have been mentioned here? Why do you want to roll your own? Wheel is round. Must reinvent. Ooga booga?

  • totototototo Member
    edited May 2022

    Is HetrixTools not enough?

    (edit) I mean, what I said about their API

  • ...check the uptime?

  • pufferfpufferf Member

    I use Munin, you can notice if the server has been rebooted using the uptime graph.

    A simpler solution would be to send a mail from the host at init.

  • Sir, you are needing AutoBoot(tm) from DewLancing sir.

  • yoursunnyyoursunny Member, IPv6 Advocate

    @Franzkafka said:
    I want to write a go program running as a service in my Vpses and it can notify me when my vps is booting or shuting down

    Write a systemd service that is configured to start automatically.
    You should use Type=oneshot.
    Then, put two different commands in ExecStart= and ExecStop=, the former is called when your server is booting, the latter is called when your server is shutting down.

    Thanked by 1webcraft
Sign In or Register to comment.