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
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
      • 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)
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Pogram
    • DataMiner DevOps Support
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
  • Downloads
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Solutions
    • Deal Registration
  • >> Go to dataminer.services

How to retrieve all alarms with respect to view in GQI script

Solved335 views4 days ago#lowcodeapplication alarms GQI
1
Apurva Tandon [DevOps Advocate]1.65K 15th January 2025 0 Comments

How to retrieve all alarms in view (which can have sub views) in GQI script, like for example

I want of get all of this table info but in GQI

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

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Matthijs Favorel [SLC] [DevOps Advocate]2.01K Posted 15th January 2025 4 Comments

Hi Apurva,

To filter alarms based on a view, you need to get the elements in that view.
The “Get View Relations” data source can be used to get this data, after which you can join this with the “Get Alarms” data source.

Note that with this approach, you might not get the identical list as in Cube (Services, analytical alarms,…)

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 4 days ago
Apurva Tandon [DevOps Advocate] commented 15th January 2025

Is there a way wherein I can write an adhoc data GQI script to fetch all this info if I give the view like in the image I provided?

I have this script
DmsAgent agent = new DmsAgent();
GetActiveAlarmsMessage getActiveAlarmsRequest = new GetActiveAlarmsMessage(agent.ID);
var res = _dms.SendMessage(getActiveAlarmsRequest) as ActiveAlarmsResponseMessage;
var activeAlarms = res.ActiveAlarms.WhereNotNull().ToList();
var filteredAlarms = activeAlarms
.Where(alarm => alarm.ViewImpactInfo.Any(x => x.Name == "Event Monitoring"))
.ToList();

foreach (var alarm in filteredAlarms.OrderBy(x => x.Severity))
{
if (alarm.Services != null && alarm.Services.Length > 0)
{
servicesName.Clear();
foreach (var service in alarm.Services)
{
var request = new GetServiceByIDMessage(service);
var serviceInfo = _dms.SendMessage(request) as ServiceInfoEventMessage;
var requestForView = new GetViewsForServiceMessage(agent.ID, serviceInfo.ID);
var viewInfo = _dms.SendMessage(requestForView) as GetViewsForServiceResponse;
var views = viewInfo?.Views;
_logger.Information("VIEWS………");
foreach (var item in views)
{
_logger.Information(item.Name);
}
if (serviceInfo != null)
{
string serviceName = serviceInfo.Name;
servicesName.Add(serviceName);
}
}
}
var key = $"{alarm.AlarmID} – {alarm.ElementID}";
var cells = new[]
{
new GQICell { Value = alarm.ElementName },
new GQICell { Value = alarm.ParameterName },
new GQICell { Value = alarm.Severity },
new GQICell { Value = alarm.Value },
new GQICell { Value = alarm.Type },
new GQICell { Value = string.Join(";", servicesName) },
new GQICell { Value = alarm.Owner },
new GQICell { Value = alarm.TimeOfArrival.ToUniversalTime() },
new GQICell { Value = alarm.AlarmID },
new GQICell { Value = alarm.DataMinerID },
};
rowsToReturn.Add(new GQIRow(key, cells));
}

so is there a way, I can say return all this info for GQI, but for the view name I specify like Event Monitoring in this case, like I see on cube

Matthijs Favorel [SLC] [DevOps Advocate] commented 15th January 2025

That is definitely possible, see for example this GQI Ad-hoc data source that gets alarms based on a public alarm filter: https://github.com/SkylineCommunications/SLC-GQIDS-ActiveAlarmsUsingFilter

Apurva Tandon [DevOps Advocate] commented 15th January 2025

I could get but in filter do I need to pass view name like "Event Monitoring" in my case to get all services inside that?

Matthijs Favorel [SLC] [DevOps Advocate] commented 15th January 2025

The Filter in that example needs to be the name of an existing public alarm filter that was created in the alarm console in cube.

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