signalfx.log.View
Explore with Pulumi AI
You can add logs data to your Observability Cloud dashboards without turning your logs into metrics first.
A log view displays log lines in a table form in a dashboard and shows you in detail what is happening and why.
Example
resource "signalfx_log_view" "my_log_view" {
name = "Sample Log View"
description = "Lorem ipsum dolor sit amet, laudem tibique iracundia at mea. Nam posse dolores ex, nec cu adhuc putent honestatis"
program_text = <<-EOF
logs(filter=field('message') == 'Transaction processed' and field('service.name') == 'paymentservice').publish()
EOF
time_range = 900
sort_options {
descending= false
field= "severity"
}
columns {
name="severity"
}
columns {
name="time"
}
columns {
name="amount.currency_code"
}
columns {
name="amount.nanos"
}
columns {
name="amount.units"
}
columns {
name="message"
}
}
Arguments
The following arguments are supported in the resource block:
name
- (Required) Name of the log view.program_text
- (Required) Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.description
- (Optional) Description of the log view.time_range
- (Optional) From when to display data. Splunk Observability Cloud time syntax (e.g."-5m"
,"-1h"
). Conflicts withstart_time
andend_time
.start_time
- (Optional) Seconds since epoch. Used for visualization. Conflicts withtime_range
.end_time
- (Optional) Seconds since epoch. Used for visualization. Conflicts withtime_range
.columns
- (Optional) The column headers to show on the log view.sort_options
- (Optional) The sorting options configuration to specify if the log view table needs to be sorted in a particular field.default_connection
- (Optional) The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
Attributes
In a addition to all arguments above, the following attributes are exported:
id
- The ID of the log view.url
- The URL of the log view.
Create View Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new View(name: string, args: ViewArgs, opts?: CustomResourceOptions);
@overload
def View(resource_name: str,
args: ViewArgs,
opts: Optional[ResourceOptions] = None)
@overload
def View(resource_name: str,
opts: Optional[ResourceOptions] = None,
program_text: Optional[str] = None,
columns: Optional[Sequence[ViewColumnArgs]] = None,
default_connection: Optional[str] = None,
description: Optional[str] = None,
end_time: Optional[int] = None,
name: Optional[str] = None,
sort_options: Optional[Sequence[ViewSortOptionArgs]] = None,
start_time: Optional[int] = None,
time_range: Optional[int] = None)
func NewView(ctx *Context, name string, args ViewArgs, opts ...ResourceOption) (*View, error)
public View(string name, ViewArgs args, CustomResourceOptions? opts = null)
type: signalfx:log:View
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Example
The following reference example uses placeholder values for all input properties.
var viewResource = new SignalFx.Log.View("viewResource", new()
{
ProgramText = "string",
Columns = new[]
{
new SignalFx.Log.Inputs.ViewColumnArgs
{
Name = "string",
},
},
DefaultConnection = "string",
Description = "string",
EndTime = 0,
Name = "string",
SortOptions = new[]
{
new SignalFx.Log.Inputs.ViewSortOptionArgs
{
Descending = false,
Field = "string",
},
},
StartTime = 0,
TimeRange = 0,
});
example, err := log.NewView(ctx, "viewResource", &log.ViewArgs{
ProgramText: pulumi.String("string"),
Columns: log.ViewColumnArray{
&log.ViewColumnArgs{
Name: pulumi.String("string"),
},
},
DefaultConnection: pulumi.String("string"),
Description: pulumi.String("string"),
EndTime: pulumi.Int(0),
Name: pulumi.String("string"),
SortOptions: log.ViewSortOptionArray{
&log.ViewSortOptionArgs{
Descending: pulumi.Bool(false),
Field: pulumi.String("string"),
},
},
StartTime: pulumi.Int(0),
TimeRange: pulumi.Int(0),
})
var viewResource = new View("viewResource", ViewArgs.builder()
.programText("string")
.columns(ViewColumnArgs.builder()
.name("string")
.build())
.defaultConnection("string")
.description("string")
.endTime(0)
.name("string")
.sortOptions(ViewSortOptionArgs.builder()
.descending(false)
.field("string")
.build())
.startTime(0)
.timeRange(0)
.build());
view_resource = signalfx.log.View("viewResource",
program_text="string",
columns=[signalfx.log.ViewColumnArgs(
name="string",
)],
default_connection="string",
description="string",
end_time=0,
name="string",
sort_options=[signalfx.log.ViewSortOptionArgs(
descending=False,
field="string",
)],
start_time=0,
time_range=0)
const viewResource = new signalfx.log.View("viewResource", {
programText: "string",
columns: [{
name: "string",
}],
defaultConnection: "string",
description: "string",
endTime: 0,
name: "string",
sortOptions: [{
descending: false,
field: "string",
}],
startTime: 0,
timeRange: 0,
});
type: signalfx:log:View
properties:
columns:
- name: string
defaultConnection: string
description: string
endTime: 0
name: string
programText: string
sortOptions:
- descending: false
field: string
startTime: 0
timeRange: 0
View Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The View resource accepts the following input properties:
- Program
Text string - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- Columns
List<Pulumi.
Signal Fx. Log. Inputs. View Column> - Column configuration
- Default
Connection string - default connection that the dashboard uses
- Description string
- Description of the chart (Optional)
- End
Time int - Seconds since epoch to end the visualization
- Name string
- Name of the chart
- Sort
Options List<Pulumi.Signal Fx. Log. Inputs. View Sort Option> - Sorting options configuration
- Start
Time int - Seconds since epoch to start the visualization
- Time
Range int - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- Program
Text string - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- Columns
[]View
Column Args - Column configuration
- Default
Connection string - default connection that the dashboard uses
- Description string
- Description of the chart (Optional)
- End
Time int - Seconds since epoch to end the visualization
- Name string
- Name of the chart
- Sort
Options []ViewSort Option Args - Sorting options configuration
- Start
Time int - Seconds since epoch to start the visualization
- Time
Range int - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- program
Text String - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- columns
List<View
Column> - Column configuration
- default
Connection String - default connection that the dashboard uses
- description String
- Description of the chart (Optional)
- end
Time Integer - Seconds since epoch to end the visualization
- name String
- Name of the chart
- sort
Options List<ViewSort Option> - Sorting options configuration
- start
Time Integer - Seconds since epoch to start the visualization
- time
Range Integer - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- program
Text string - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- columns
View
Column[] - Column configuration
- default
Connection string - default connection that the dashboard uses
- description string
- Description of the chart (Optional)
- end
Time number - Seconds since epoch to end the visualization
- name string
- Name of the chart
- sort
Options ViewSort Option[] - Sorting options configuration
- start
Time number - Seconds since epoch to start the visualization
- time
Range number - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- program_
text str - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- columns
Sequence[View
Column Args] - Column configuration
- default_
connection str - default connection that the dashboard uses
- description str
- Description of the chart (Optional)
- end_
time int - Seconds since epoch to end the visualization
- name str
- Name of the chart
- sort_
options Sequence[ViewSort Option Args] - Sorting options configuration
- start_
time int - Seconds since epoch to start the visualization
- time_
range int - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- program
Text String - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- columns List<Property Map>
- Column configuration
- default
Connection String - default connection that the dashboard uses
- description String
- Description of the chart (Optional)
- end
Time Number - Seconds since epoch to end the visualization
- name String
- Name of the chart
- sort
Options List<Property Map> - Sorting options configuration
- start
Time Number - Seconds since epoch to start the visualization
- time
Range Number - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
Outputs
All input properties are implicitly available as output properties. Additionally, the View resource produces the following output properties:
Look up Existing View Resource
Get an existing View resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ViewState, opts?: CustomResourceOptions): View
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
columns: Optional[Sequence[ViewColumnArgs]] = None,
default_connection: Optional[str] = None,
description: Optional[str] = None,
end_time: Optional[int] = None,
name: Optional[str] = None,
program_text: Optional[str] = None,
sort_options: Optional[Sequence[ViewSortOptionArgs]] = None,
start_time: Optional[int] = None,
time_range: Optional[int] = None,
url: Optional[str] = None) -> View
func GetView(ctx *Context, name string, id IDInput, state *ViewState, opts ...ResourceOption) (*View, error)
public static View Get(string name, Input<string> id, ViewState? state, CustomResourceOptions? opts = null)
public static View get(String name, Output<String> id, ViewState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Columns
List<Pulumi.
Signal Fx. Log. Inputs. View Column> - Column configuration
- Default
Connection string - default connection that the dashboard uses
- Description string
- Description of the chart (Optional)
- End
Time int - Seconds since epoch to end the visualization
- Name string
- Name of the chart
- Program
Text string - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- Sort
Options List<Pulumi.Signal Fx. Log. Inputs. View Sort Option> - Sorting options configuration
- Start
Time int - Seconds since epoch to start the visualization
- Time
Range int - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- Url string
- URL of the chart
- Columns
[]View
Column Args - Column configuration
- Default
Connection string - default connection that the dashboard uses
- Description string
- Description of the chart (Optional)
- End
Time int - Seconds since epoch to end the visualization
- Name string
- Name of the chart
- Program
Text string - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- Sort
Options []ViewSort Option Args - Sorting options configuration
- Start
Time int - Seconds since epoch to start the visualization
- Time
Range int - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- Url string
- URL of the chart
- columns
List<View
Column> - Column configuration
- default
Connection String - default connection that the dashboard uses
- description String
- Description of the chart (Optional)
- end
Time Integer - Seconds since epoch to end the visualization
- name String
- Name of the chart
- program
Text String - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- sort
Options List<ViewSort Option> - Sorting options configuration
- start
Time Integer - Seconds since epoch to start the visualization
- time
Range Integer - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- url String
- URL of the chart
- columns
View
Column[] - Column configuration
- default
Connection string - default connection that the dashboard uses
- description string
- Description of the chart (Optional)
- end
Time number - Seconds since epoch to end the visualization
- name string
- Name of the chart
- program
Text string - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- sort
Options ViewSort Option[] - Sorting options configuration
- start
Time number - Seconds since epoch to start the visualization
- time
Range number - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- url string
- URL of the chart
- columns
Sequence[View
Column Args] - Column configuration
- default_
connection str - default connection that the dashboard uses
- description str
- Description of the chart (Optional)
- end_
time int - Seconds since epoch to end the visualization
- name str
- Name of the chart
- program_
text str - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- sort_
options Sequence[ViewSort Option Args] - Sorting options configuration
- start_
time int - Seconds since epoch to start the visualization
- time_
range int - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- url str
- URL of the chart
- columns List<Property Map>
- Column configuration
- default
Connection String - default connection that the dashboard uses
- description String
- Description of the chart (Optional)
- end
Time Number - Seconds since epoch to end the visualization
- name String
- Name of the chart
- program
Text String - Signalflow program text for the chart. More info at "https://developers.signalfx.com/docs/signalflow-overview"
- sort
Options List<Property Map> - Sorting options configuration
- start
Time Number - Seconds since epoch to start the visualization
- time
Range Number - Seconds to display in the visualization. This is a rolling range from the current time. Example: 3600 =
-1h
- url String
- URL of the chart
Supporting Types
ViewColumn, ViewColumnArgs
- Name string
- Name of the column
- Name string
- Name of the column
- name String
- Name of the column
- name string
- Name of the column
- name str
- Name of the column
- name String
- Name of the column
ViewSortOption, ViewSortOptionArgs
- Descending bool
- Name of the column
- Field string
- Name of the column
- Descending bool
- Name of the column
- Field string
- Name of the column
- descending Boolean
- Name of the column
- field String
- Name of the column
- descending boolean
- Name of the column
- field string
- Name of the column
- descending bool
- Name of the column
- field str
- Name of the column
- descending Boolean
- Name of the column
- field String
- Name of the column
Package Details
- Repository
- SignalFx pulumi/pulumi-signalfx
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
signalfx
Terraform Provider.