-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk importing of uptime monitoring servers to the system #1599
Comments
Commenting here so I can be assigned to this issue. |
Assigned. You can reach out to me on the Discord channel (link is in readme.md) to discuss any questions you may have. |
@fluellenarman the bare minimum of data need to create a {
name: "Your Monitor Name"
url: "www.your-url.com"
} Everything else is optional, but can be included. Important to note that the correct Monitor schema for reference: import mongoose from "mongoose";
const MonitorSchema = mongoose.Schema(
{
userId: {
type: mongoose.Schema.Types.ObjectId,
ref: "User",
immutable: true,
required: true,
},
teamId: {
type: mongoose.Schema.Types.ObjectId,
ref: "Team",
immutable: true,
required: true,
},
name: {
type: String,
required: true,
},
description: {
type: String,
},
status: {
type: Boolean,
default: undefined,
},
type: {
type: String,
required: true,
enum: [
"http",
"ping",
"pagespeed",
"hardware",
"docker",
"port",
"distributed_http",
],
},
url: {
type: String,
required: true,
},
port: {
type: Number,
},
isActive: {
type: Boolean,
default: true,
},
interval: {
// in milliseconds
type: Number,
default: 60000,
},
uptimePercentage: {
type: Number,
default: undefined,
},
thresholds: {
type: {
usage_cpu: { type: Number },
usage_memory: { type: Number },
usage_disk: { type: Number },
},
_id: false,
},
notifications: [
{
type: mongoose.Schema.Types.ObjectId,
ref: "Notification",
},
],
secret: {
type: String,
},
},
{
timestamps: true,
}
);
export default mongoose.model("Monitor", MonitorSchema); |
Thank you for the info. This was very useful to me in implementing this feature. Update:user can now use a .csv file to add servers to checkmate.
error: monitorController connect ECONNREFUSED 207.241.237.3:80 In addition, importing servers through the .csv is not as fast as adding demo monitors in the settings method
Todo
Please let me know if there's anything that I missed or anything else I should be working on in relation to this issue. Sorry for the late update. |
I think that should be it. If you can figure out the items under todo, we can have a look. |
Here are some details and use-cases:
To make migrations easier, we can add an automatic server addition feature to Checkmate. This will allow admins to upload a CSV file with server details (URL, display name, and monitor frequency) directly from the UI, saving time and effort.
How it works:
Benefits are faster migration for users switching from other tools and improved user interface.
PS: We already have a function in Settings that adds up to 300 servers at once using a static file. This can be adapted for CSV uploads, making implementation faster and easier. It will also give you an understanding of how adding servers work in general.
(For the grant, this is a "medium project", but with some hurdles to tackle)
The text was updated successfully, but these errors were encountered: