0

How can I include the dataview when send alert?

I tried to populate HTML table within alert, but seems GENEOS rule not come with loop function so it's not flexible enough to include variable lines.

eg: sql-tookit sampler capture some error and i want the alert include all output lines.

  • I figure out one solution,there is one useful script called gateway HTML alert onITRS site. it pull the dataview from webslinger via wget and sendmail with HTML content. – Yongcan-Frank-Lu Apr 27 '17 at 10:11

2 Answers2

0

You can use the target "dataviewName".

Example:

format ("Managed entity: %s, Dataview: %s",target "managedEntityName", target "dataviewName")

Hope it helps

Regards

nobody
  • 23
  • 6
  • Thanks for the comment but I'm not only want the dataview NAME in alert, but need all the data cell captured the dataview. – Yongcan-Frank-Lu Dec 17 '17 at 14:48
  • Hi, I think you should add every single cell as Path aliases and refer them in the message as mentioned above. For example in a case of 2 columns (UserId + SessionCount) sql, I think you should define the rule with target on SessionCount cell and reference the UserId as path aliase and them refer it in the rule message: `format ("UserId: %s, SessionCount: %s",path "userIdPathAliaseName" value, value)` You can use this way to referenciate all your sql outputs. I haven't seen any Geneos documentation referencing iteration in rules... so I hope this approach helps you. – nobody Dec 18 '17 at 10:47
  • This approach would trigger as many alerts as number of lines captured, eg: if 10 rows captured then 10 alerts would trigger which would causing flood alerts. I just need one alert only, which contain 10 lines. – Yongcan-Frank-Lu Dec 19 '17 at 21:37
0

For what you want, you could use the perl script ITRS provides as an example on itrsgroup.com and in conjunction with WebSlinger, you can send the full data view in the mail:

enter image description here

Maybe this helps. This way, you do not have to use the compute engine to cary around data from all columns and assign user data, etc.

Andrei
  • 1