

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Custom Report Parameters for a server Hostname
I'm looking to add a hostname of the ESM server into the subject of a report. I have 5+ ESM servers running the same report and I need to know where it came from. There are custom variables that I can use for dates and names, but I don't see anything for Hostname. Has anyone got this to work in the past?
Current Report Subject: $ReportName
ex: "My Custom Report"
Desired Report Subject: $hostname $ReportName
ex: "ESMSystem.domain.com My Custom Report"
From the help docs here are more on the report parameters that are available:
Report | Prints the name of the report, as specified in the Name field on the Attributes tab of the Report Editor. | |||||||||||
Prints a disclaimer statement regarding the user permissions with which the report was run. The disclaimer statement is a read-only string which is generated when report data has been filtered due to limited access privileges of the user Reports are generated only with data for which the current user has access privileges. Depending on user permissions for the user running a given report, access to some types of events or data may be curtailed. In such cases, the report is generated with all the information for which the user has access privileges. Events and data requiring higher-level access privileges are not included in the report. The access disclaimer statement is a standard explanation of the limitations of such a report. | ||||||||||||
Time | Prints the current date and time. (Same as $Now) Example output: 12-06-2011-15:32:19. Tip: Formats for dates and times depend on your Console preference settings. To change the way dates and times are displayed throughout the Console, choose Edit > Preferences, then click the Date & Time button. For more information, see Changing User Preferences. | |||||||||||
Prints the current date and time. (Same as $CurrentDateTime) | ||||||||||||
Prints the current date and time minus the number of days you specify. For example, if you ran the report on 12-06-2011 at 15:33:00 and specified the current date and time minus 1 day ($CurrentDateTime-1d), this reference would output 12-05-2011-15:33:00. If, on the same day, you specified the current date and time minus 3 days ($CurrentDateTime-3d), this reference would output 12-03-2011-15:33:00 | ||||||||||||
Parameters | Prints the name of the report format that is configured as the default. Output formats are:
If the default output format for the report is set to html, then $Report_Format reference simply will print the word html. See Setting Report Parameters: Default and Custom in the Creating Reports topic for information on how to set the default output formats for reports when creating reports. See also Report Parameters in for information about setting parameters at report runtime. | |||||||||||
Prints the user name specified, if any, for the Run as User parameter in the report. | ||||||||||||
Prints the e-mail address specified, if any, for the Email to parameter in the report. | ||||||||||||
Prints the e-mail format specified, if any, for the Email Format parameter in the report. For example, Send URL or Attach Report. | ||||||||||||
Prints the filters used by the referenced query for this report. | ||||||||||||
Prints the folder location where the archived report is stored. | ||||||||||||
Prints the row limit for the specified component. Tip: <ComponentID> refers to the data components or building blocks of a report. To view the components of a given report, right-click the report in the Navigator panel, choose Edit Report, and click the Data tab for the report. For example, if the report contains a component called Table, you can display related information by using the Velocity reference $Table.Row_Limit, $Table.Time_Zone, and so forth. Similarly, if the report, contains components called Chart1, Chart2, and Chart3; you can display related information on each of the charts by using references such as Chart1.Time_Zone, Chart2.Start_Time, and so forth. | ||||||||||||
Prints the time zone for the specified component. For example, Table.Time_Zone would output the time zone used for the data in a component called Table in your report. | ||||||||||||
Prints the start time for the specified component. For example, Table.Start_Time would output the start time used for the data in a component called Table in your report. (Start Time is a report parameter that can be configured on a per-component basis.) | ||||||||||||
Prints the end time for the specified component. For example, Table.End_Time would output the end time used for the data in a component called Table in your report. (End Time is a report parameter which can be configured on a per-component basis.) | ||||||||||||
Known variables that work:
#if ($Custom.StartTime == $Custom.EndTime) $Custom.StartTime #elseif (($Custom.StartTime.length()>0) && ($Custom.EndTime.length()>0)) $Custom.StartTime to $Custom.EndTime #else $Now #end
Page $CurrentPageNumber of $TotalPageNumber
I was thinking maybe there was a way to pull the hostname from the "System Information" dashbaord and use that, however I don't know if this value would be able to be accessed via "$componentid.parameter_name" varraible.
Thanks,
Grant


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Grant,
Did you find a solution ?
Thanks
Tomasz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
custom can be anything.
If you add "@deviceHostName=hostname" in the query for your report (minus the quotes) you can then add the 'Custom Parameter' to the report under parameters (give it a name) then in the 'Text Attributes' section of the report (template tab) you can reference the custom parameter in the Text field. i.e. $Table.deviceHostName.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
@AS_User Thanks for this comment...
We recently upgraded from 6.5 to 6.11 and the $table/$chart prefix is a change from the previous method where you could just use "$custom.custom_parameter_name"... It's a pretty annoying change considering the previous method works in any imported content but not newly constructed content.
Boo... but thanks again @AS_User I was getting annoying trying to find the right variable syntax.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi All,
Is there any update how to insert the report generator ESM hostname/address via variables into the report?
Thanks in advance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2 methods come to mind.
1) Add the ESM Hostname/Address as a static variable to the report query and reference it in the template via one of the methods above.
2) Change the email from account that your ESM uses(you'll need to run ESM setup for this)... This is what I do to identify which ESM a report/alert comes from.