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
    • Empower Replay: Limited Edition
    • 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
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • 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)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Issue with Automation Script: Constructor Argument Error in DM Version 10.3.0.0-13184

Solved844 views6 days agoAlarm Console Automation script SLNetClientTest tool
2
A B M Sidddique [DevOps Advocate]371 2nd October 2024 1 Comment

Hello Dojo Community !

I have been working on an automation script with additional logic to clear out week old Correlated warning alarms that have their 'auto-clear' functionality disabled. The original script was kindly provided by Joachim from Dojo community :
SLC-AS-ClearNoticeAlarmsOlderThanAWeek/Clear Notice Alarms Older Than A Week_1/Clear Notice Alarms Older Than A Week_1.cs at master · SkylineCommunications/SLC-AS-ClearNoticeAlarmsOlderThanAWeek (github.com)

previous question : Method of Clearing Alarms from the alarm console using an Automation script - DataMiner Dojo

I’ve managed to select and filter the necessary alarm properties (AlarmID, Element ID, Hosting ID, Source, Value) using the SLNet Client tool. However, after executing the provided script in Visual Studio and testing in Cube AS validation, I encountered errors.

It appears that one of the arguments I’m passing isn’t correct. I receive an error stating the constructor takes 4 arguments in the format (int, int, int, string). Given that our DM version is 10.3.0.0-13184, I suspect that some .NET methods might behave differently. Also the Alarm is not getting cleared as expected (manually we do this by right click on the alarm and selecting the option 'clear alarm')

Could anyone kindly help me identify which argument might be incorrect and suggest how to adapt the script for my environment? I’d appreciate any guidance on fixing the issue so that the script clears the alarms as expected.

Thank you for your continued support!

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 6 days ago
Marieke Goethals [SLC] [DevOps Catalyst] commented 6 days ago

As this question has now been inactive for a long time, I will close it. If you still need assistance with this, could you contact tech support? For more info, see https://docs.dataminer.services/user-guide/Troubleshooting/Contacting_tech_support.html

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
2
Tom Waterbley [SLC] [DevOps Catalyst]8.89K Posted 2nd October 2024 12 Comments

Hi, version 10.4.9 of the Skyline.DataMiner.Dev.Automation NuGet package is referenced in the C# project on this line. Since you are using an older DataMiner version, it would be better if version 10.3.0.21  is referenced instead. This can also be changed using the package manager in Visual Studio.

After changing the version, you should see that an error is shown in Visual Studio if something doesn't exist yet in the older NuGet package.

The problem seems to be that the "TreeID" property is missing on the alarms. I think this can be solved as follows (untested):

var clearingMessage = $"Cleared the alarm with TreeID '{alarm.DataMinerID}/{alarm.RootAlarmID}' from Automation.";
SetAlarmStateMessage setAlarmStateMessage = new SetAlarmStateMessage(alarm.DataMinerID, alarm.RootAlarmID, (int)Skyline.DataMiner.Net.Enums.AlarmUserStatus.Clear, clearingMessage);
engine.SendSLNetMessage(setAlarmStateMessage);

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 6 days ago
A B M Sidddique [DevOps Advocate] commented 3rd October 2024

Thank you Tom for your advice and i have downgraded the Nuget package to 10.3.0.2. I just wanted to know , if the (int)Skyline.DataMiner.Net.Enums.AlarmUserStatus.Clear, // Clear Status

Would this argument work to the version to clear the alarm or should I use something else ? execution is successful with no error but the alarm is not clearing

Tom Waterbley [SLC] [DevOps Catalyst] commented 3rd October 2024

Hi, could you please try using value ‘7’ instead of the enum as value for the third argument? But that should be the same, and according to what I can find in other examples it should work.

A B M Sidddique [DevOps Advocate] commented 3rd October 2024

Hi Tom ,
Thank you for your help , using ‘7’ instead of enum , SLNET is able to create the message . Out of curiosity is there a way / method to directly clear the alarm from the alarm console ( as we do manually by right clicking on an alarm and select ‘clear alarm”) rather then SLNET client tool as I realized some of our servers /DMA we work on are not owned by us but still have admin privilege’s to utilize Cube but may not have the ability to run SLNET client tool, so might face issue on that.

Tom Waterbley [SLC] [DevOps Catalyst] commented 4th October 2024

Hi, SLNet client test tool uses the same type of connection of Cube, with the same previleges. So you should be able to perform the actions on those DMAs as well. Please always be careful when doing things with the test tool though.

A B M Sidddique [DevOps Advocate] commented 7th October 2024

Hi Tom,
I have been trying to troubleshoot it but we are still receiving the same error :

” Failed to clear alarm with RootAlarmID ‘127510621’. Error: You don’t have permission to perform this action.
(Script ‘Clear Notice Alarms Older Than A Week’)”

“2024/10/07 08:16:20.086|SLAutomation.exe 10.3.2243.12260|16140|25728|CSharp|DBG|5|(Script Clear Notice Alarms Older Than A Week/2) Extended Error Info:

(Code: 0x80131500) Skyline.DataMiner.Automation.ScriptAbortException: RunSafe|Something went wrong.
at Skyline.DataMiner.Automation.Engine.ExitFail(String reason)
at ClearNoticeAlarmsOlderThanAWeek_1.Script.RunSafe(IEngine engine)
at ClearNoticeAlarmsOlderThanAWeek_1.Script.Run(IEngine engine)

2024/10/07 08:16:20.086|SLAutomation.exe 10.3.2243.12260|16140|25728|CScriptLoader::ExitNow|DBG|-1|[ABM Siddique] (Script Clear Notice Alarms Older Than A Week) EXIT: “RunSafe|Something went wrong.”
2024/10/07 08:16:20.087|SLAutomation.exe 10.3.2243.12260|16140|25728|CScriptLoader::FinalActions|DBG|3|[ABM Siddique] (Script Clear Notice Alarms Older Than A Week) Script execution FAILED
2024/10/07 08:16:20.087|SLAutomation.exe 10.3.2243.12260|16140|25728|CAutomation::Execute|INF|0|[ABM Siddique] Finished executing script: ‘Clear Notice Alarms Older Than A Week’ (ID: 174) – FAILED – Execution took 00.394s.”

I believe it is because of the DMA server restrictions we have that is not allowing to go through with the script action (have DM admin privileges’). Thank you

Show 7 more comments
You are viewing 1 out of 2 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

© 2025 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