mirror of
https://github.com/mayanayza/netvisor.git
synced 2025-12-10 08:24:08 -06:00
Add Pulse service definition
This commit is contained in:
@@ -135,6 +135,7 @@ pub mod print_server;
|
||||
pub mod prometheus;
|
||||
pub mod prowlarr;
|
||||
pub mod proxmox;
|
||||
pub mod pulse;
|
||||
pub mod qbittorrent;
|
||||
pub mod qnap;
|
||||
pub mod radarr;
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
use crate::server::hosts::r#impl::ports::PortBase;
|
||||
use crate::server::services::definitions::{ServiceDefinitionFactory, create_service};
|
||||
use crate::server::services::r#impl::categories::ServiceCategory;
|
||||
use crate::server::services::r#impl::definitions::ServiceDefinition;
|
||||
use crate::server::services::r#impl::patterns::Pattern;
|
||||
|
||||
#[derive(Default, Clone, Eq, PartialEq, Hash)]
|
||||
pub struct Pulse;
|
||||
|
||||
impl ServiceDefinition for Pulse {
|
||||
fn name(&self) -> &'static str {
|
||||
"Pulse"
|
||||
}
|
||||
fn description(&self) -> &'static str {
|
||||
"Proxmox Cluster, Docker and host monitor"
|
||||
}
|
||||
fn category(&self) -> ServiceCategory {
|
||||
ServiceCategory::Monitoring
|
||||
}
|
||||
|
||||
fn discovery_pattern(&self) -> Pattern<'_> {
|
||||
Pattern::AllOf(vec![
|
||||
Pattern::Endpoint(PortBase::new_tcp(7655), "/", "Pulse"),
|
||||
Pattern::Endpoint(
|
||||
PortBase::new_tcp(7655),
|
||||
"/api/health",
|
||||
"proxyInstallScriptAvailable",
|
||||
),
|
||||
])
|
||||
}
|
||||
|
||||
fn logo_url(&self) -> &'static str {
|
||||
"https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/pulse.svg"
|
||||
}
|
||||
}
|
||||
|
||||
inventory::submit!(ServiceDefinitionFactory::new(create_service::<Pulse>));
|
||||
Reference in New Issue
Block a user