File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
packages/random-alerts/src Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1717 args = {
1818 urls = mkOption {
1919 type = types . listOf types . str ;
20- example = "[http://localhost:9093]" ;
21- description = ''Alertmanager URLs'' ;
20+ example = [ "http://localhost:9093" ] ;
21+ description = ''
22+ A list of Alertmanager endpoint URLs used for sending alert notifications.
23+ '' ;
2224 } ;
2325
2426 min-wait-time = mkOption {
Original file line number Diff line number Diff line change @@ -101,10 +101,10 @@ void executeAtRandomIntervals(Params params)
101101
102102 if (currentTimeTOD >= startTime && currentTimeTOD <= endTime)
103103 {
104- for ( int i = 0 ; i < urls.length; i ++ )
104+ foreach (url; urls)
105105 {
106- infof(" Posting alert on %s..." , urls[i] );
107- postAlert(urls[i] , alertDuration);
106+ infof(" Posting alert on %s..." , url );
107+ postAlert(url , alertDuration);
108108 infof(" Alert posted successfully." );
109109 }
110110 }
You can’t perform that action at this time.
0 commit comments