Comments (4)
There is sadly no way to do this built-in. The API is also read-only so your only way to do this could be by having a PHP Script on Cron or NodeJS app that will check the UptimeRobot API status and create an incident in Server Status database directly, through MySQL.
If you would look into spending a bit more time and contribute, you could use the classes from the project and create a file inside the repo that could be setup to use uptimerobot if it is enabled in the config.
@Pryx would be of better help if you decide to write something yourself
from server-status.
I think implementing a write-enabled API would be the best way. Maybe with a simple user/pw authentication for starters.
from server-status.
I think implementing a write-enabled API would be the best way. Maybe with a simple user/pw authentication for starters.
Most likely but it's a big amount of change that may not be that easy to do. I also don't think anyone is active enough to do such major updates.
from server-status.
``I have an Idea:
start with a request to login to your instance:
curl -X POST 'http://example/admin/' \
--header 'Accept: */*' \
--form 'email="<mail@example>"' \
--form 'pass="<password>"' -v
Get the Line Set-Cookie: Set-Cookie: PHPSESSID=<seesionid>; path=/
and strip out PHPSESSID=<sessionid>
.
then create an incident by:
curl -X POST \
'http://example/admin/?new=incident' \
--header 'Accept: */*' \
--header 'Cookie: PHPSESSID=<sessionid>' \
--form 'type="1"' \
--form 'title="title2"' \
--form 'text="test123"' \
--form 'services[]="1"'
further explanations:
possible values for type
are: 0 = "Major outage", 1 = "Minor outage", 2 = "Planned maintenance", 3 = "Operational"
possible values for services[]
are indexes starting with 1, for your exisiting services. If you have only one, 1
would be the correct value.
NOTE: if you want to add an incident of type=2, you need to submit additional form params
time
andend_time
using ISO 8601 Format. e.g.2023-03-12 12:00
. Value oftime
need to be beforeend_time
.
NOTE 2: Since these features were not considered when creating the functions, there is no exception handling there. Do not test it in Production.
Hope this helps. i am currently working on PHP8 support, Maybe I can look into this after that. Should not be that hard to do this with one single request instead of using two.
from server-status.
Related Issues (20)
- Installation error HOT 1
- Status text acting weird HOT 1
- V2 - Beta Issues HOT 1
- Admin credentials for demo do not work HOT 2
- Not going well V1.1 HOT 17
- Report a new incident HOT 2
- QUESTION: Color
- Expired HTTPS cert on the demo site HOT 2
- Styling not showing for pages
- Specified key was too long; max key length is 767 bytes HOT 2
- Trying to get in touch regarding a security issue HOT 1
- Update & add translations
- Editable imprint / privacy policy
- Forgot Admin Password
- Still alive? HOT 10
- PHP message: PHP Notice: Undefined variable: strSubsMenu HOT 1
- [Suggestion] How about using Weblate for translation?
- Wiki article needs updated
- 500 Internal Server Error right after Installing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server-status.