Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/src/handlers/http/cluster/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use std::time::Duration;

use super::modal::IngestorMetadata;
use clokwerk::{AsyncScheduler, Interval};
pub const INTERNAL_STREAM_NAME: &str = "meta";
pub const INTERNAL_STREAM_NAME: &str = "pmeta";

const CLUSTER_METRICS_INTERVAL_SECONDS: Interval = clokwerk::Interval::Minutes(1);

Expand Down
16 changes: 13 additions & 3 deletions server/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,25 @@
*
*/

use self::error::{AlertValidationError, StreamNameValidationError, UsernameValidationError};
use crate::alerts::rule::base::{NumericRule, StringRule};
use crate::alerts::rule::{ColumnRule, ConsecutiveNumericRule, ConsecutiveStringRule};
use crate::alerts::{Alerts, Rule};

use self::error::{AlertValidationError, StreamNameValidationError, UsernameValidationError};
use crate::handlers::http::cluster::INTERNAL_STREAM_NAME;

// Add more sql keywords here in lower case
const DENIED_NAMES: &[&str] = &[
"select", "from", "where", "group", "by", "order", "limit", "offset", "join", "and", "meta",
"select",
"from",
"where",
"group",
"by",
"order",
"limit",
"offset",
"join",
"and",
INTERNAL_STREAM_NAME,
];

pub fn alert(alerts: &Alerts) -> Result<(), AlertValidationError> {
Expand Down