Skip to content
DataMiner Dojo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

Creating Custom Alarm Property Through Automation

149 views1 day agoalarms Custom properties
4
Ana Pinho [SLC] [DevOps Member]1.41K 2 days ago 0 Comments

Hello Dojo,

Is it possible to create custom properties through automation without having an alarm beforehand?

If so, how can this be done?

Also, is it possible to expose those properties on the Alarm Console through automation?

Thank you!

Thijs Vanovenacker [SLC] [DevOps Advocate] Answered question 1 day ago

3 Answers

  • Active
  • Voted
  • Newest
  • Oldest
2
José Silva [SLC] [DevOps Enabler]1.89K Posted 1 day ago 1 Comment

Hi ana,

Can you try this:

var propertyConfig = new PropertyConfig
{
Name = property.Name,
Type = "Alarm",
};

PropertyManager.RegisterPropertyConfig(propertyConfig);
public class PropertyManager
{
private static ConcurrentDictionary<string, PropertyConfig> registredProperties = new ConcurrentDictionary<string, PropertyConfig>();

/// <summary>
/// Registers a property in DataMiner system.
/// </summary>
/// <param name="property">Property to be registered.</param>
/// <returns>True if the property was registered;otherwise false.</returns>
/// <exception cref="ArgumentNullException">If <paramref name="property"/> is null.</exception>
public static bool RegisterPropertyConfig(PropertyConfig property)
{
if (property == null)
{
throw new ArgumentNullException(nameof(property));
}

if (registredProperties.ContainsKey($"{property.Name}.{property.Type}"))
{
return true;
}

var properties = GetRegisteredProperties().ToArray();

if (properties.Any(p => p.Name == property.Name && string.Equals(p.Type, property.Type, StringComparison.InvariantCultureIgnoreCase)))
{
return true;
}

var nextId = properties.Select(x => x.ID).Max() + 1;

property.ID = nextId;

try
{
var response = Engine.SLNet.SendSingleResponseMessage(new AddPropertyConfigMessage(property)) as UpdatePropertyConfigResponse;

return response?.ID == nextId;
}
catch (Exception)
{
return false;
}
}

/// <summary>
/// Gets an <see cref="IEnumerable{T}"/> of <see cref="PropertyConfig"/> with all registered properties.
/// </summary>
/// <returns>An <see cref="IEnumerable{T}"/> of <see cref="PropertyConfig"/> with all registered properties.</returns>
public static IEnumerable<PropertyConfig> GetRegisteredProperties()
{
try
{
var response = Engine.SLNet.SendSingleResponseMessage(new GetInfoMessage(InfoType.PropertyConfiguration)) as GetPropertyConfigurationResponse;

var properties = response?.Properties ?? Enumerable.Empty<PropertyConfig>();

foreach (var prop in properties)
{
registredProperties.TryAdd($"{prop.Name}.{prop.Type.ToUpperInvariant()}", prop);
}

return properties;
}
catch (Exception)
{
return Enumerable.Empty<PropertyConfig>();
}
}
}

Kind regards,

José Silva [SLC] [DevOps Enabler] Posted new comment 1 day ago
José Silva [SLC] [DevOps Enabler] commented 1 day ago

By the way, if the goal is to have the property visible in the Alarm Console, you will need to enable the IsFilterEnabled option when creating it:

var propertyConfig = new PropertyConfig
{
Name = property.Name,
Type = "Alarm",
IsFilterEnabled = true
};

Kind regards,

You are viewing 1 out of 3 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2026 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin