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
import * as pulumi from "@pulumi/pulumi";
import * as signalfx from "@pulumi/signalfx";
const myLogView = new 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",
programText: "logs(filter=field('message') == 'Transaction processed' and field('service.name') == 'paymentservice').publish()\n",
timeRange: 900,
sortOptions: [{
descending: false,
field: "severity",
}],
columns: [
{
name: "severity",
},
{
name: "time",
},
{
name: "amount.currency_code",
},
{
name: "amount.nanos",
},
{
name: "amount.units",
},
{
name: "message",
},
],
});
import pulumi
import pulumi_signalfx as signalfx
my_log_view = 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="logs(filter=field('message') == 'Transaction processed' and field('service.name') == 'paymentservice').publish()\n",
time_range=900,
sort_options=[{
"descending": False,
"field": "severity",
}],
columns=[
{
"name": "severity",
},
{
"name": "time",
},
{
"name": "amount.currency_code",
},
{
"name": "amount.nanos",
},
{
"name": "amount.units",
},
{
"name": "message",
},
])
package main
import (
"github.com/pulumi/pulumi-signalfx/sdk/v7/go/signalfx/log"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := log.NewView(ctx, "my_log_view", &log.ViewArgs{
Name: pulumi.String("Sample Log View"),
Description: pulumi.String("Lorem ipsum dolor sit amet, laudem tibique iracundia at mea. Nam posse dolores ex, nec cu adhuc putent honestatis"),
ProgramText: pulumi.String("logs(filter=field('message') == 'Transaction processed' and field('service.name') == 'paymentservice').publish()\n"),
TimeRange: pulumi.Int(900),
SortOptions: log.ViewSortOptionArray{
&log.ViewSortOptionArgs{
Descending: pulumi.Bool(false),
Field: pulumi.String("severity"),
},
},
Columns: log.ViewColumnArray{
&log.ViewColumnArgs{
Name: pulumi.String("severity"),
},
&log.ViewColumnArgs{
Name: pulumi.String("time"),
},
&log.ViewColumnArgs{
Name: pulumi.String("amount.currency_code"),
},
&log.ViewColumnArgs{
Name: pulumi.String("amount.nanos"),
},
&log.ViewColumnArgs{
Name: pulumi.String("amount.units"),
},
&log.ViewColumnArgs{
Name: pulumi.String("message"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SignalFx = Pulumi.SignalFx;
return await Deployment.RunAsync(() =>
{
var myLogView = new SignalFx.Log.View("my_log_view", new()
{
Name = "Sample Log View",
Description = "Lorem ipsum dolor sit amet, laudem tibique iracundia at mea. Nam posse dolores ex, nec cu adhuc putent honestatis",
ProgramText = @"logs(filter=field('message') == 'Transaction processed' and field('service.name') == 'paymentservice').publish()
",
TimeRange = 900,
SortOptions = new[]
{
new SignalFx.Log.Inputs.ViewSortOptionArgs
{
Descending = false,
Field = "severity",
},
},
Columns = new[]
{
new SignalFx.Log.Inputs.ViewColumnArgs
{
Name = "severity",
},
new SignalFx.Log.Inputs.ViewColumnArgs
{
Name = "time",
},
new SignalFx.Log.Inputs.ViewColumnArgs
{
Name = "amount.currency_code",
},
new SignalFx.Log.Inputs.ViewColumnArgs
{
Name = "amount.nanos",
},
new SignalFx.Log.Inputs.ViewColumnArgs
{
Name = "amount.units",
},
new SignalFx.Log.Inputs.ViewColumnArgs
{
Name = "message",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.signalfx.log.View;
import com.pulumi.signalfx.log.ViewArgs;
import com.pulumi.signalfx.log.inputs.ViewSortOptionArgs;
import com.pulumi.signalfx.log.inputs.ViewColumnArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var myLogView = new View("myLogView", ViewArgs.builder()
.name("Sample Log View")
.description("Lorem ipsum dolor sit amet, laudem tibique iracundia at mea. Nam posse dolores ex, nec cu adhuc putent honestatis")
.programText("""
logs(filter=field('message') == 'Transaction processed' and field('service.name') == 'paymentservice').publish()
""")
.timeRange(900)
.sortOptions(ViewSortOptionArgs.builder()
.descending(false)
.field("severity")
.build())
.columns(
ViewColumnArgs.builder()
.name("severity")
.build(),
ViewColumnArgs.builder()
.name("time")
.build(),
ViewColumnArgs.builder()
.name("amount.currency_code")
.build(),
ViewColumnArgs.builder()
.name("amount.nanos")
.build(),
ViewColumnArgs.builder()
.name("amount.units")
.build(),
ViewColumnArgs.builder()
.name("message")
.build())
.build());
}
}
resources:
myLogView:
type: signalfx:log:View
name: my_log_view
properties:
name: Sample Log View
description: Lorem ipsum dolor sit amet, laudem tibique iracundia at mea. Nam posse dolores ex, nec cu adhuc putent honestatis
programText: |
logs(filter=field('message') == 'Transaction processed' and field('service.name') == 'paymentservice').publish()
timeRange: 900
sortOptions:
- descending: false
field: severity
columns:
- name: severity
- name: time
- name: amount.currency_code
- name: amount.nanos
- name: amount.units
- name: message
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.
Constructor 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 log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- Columns
List<Pulumi.
Signal Fx. Log. Inputs. View Column> - The column headers to show on the log view.
- Default
Connection string - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- Description string
- Description of the log view.
- End
Time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - Name string
- Name of the log view.
- Sort
Options List<Pulumi.Signal Fx. Log. Inputs. View Sort Option> - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- Start
Time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - Time
Range int - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
.
- Program
Text string - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- Columns
[]View
Column Args - The column headers to show on the log view.
- Default
Connection string - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- Description string
- Description of the log view.
- End
Time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - Name string
- Name of the log view.
- Sort
Options []ViewSort Option Args - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- Start
Time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - Time
Range int - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
.
- program
Text String - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- columns
List<View
Column> - The column headers to show on the log view.
- default
Connection String - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- description String
- Description of the log view.
- end
Time Integer - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - name String
- Name of the log view.
- sort
Options List<ViewSort Option> - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- start
Time Integer - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - time
Range Integer - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
.
- program
Text string - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- columns
View
Column[] - The column headers to show on the log view.
- default
Connection string - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- description string
- Description of the log view.
- end
Time number - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - name string
- Name of the log view.
- sort
Options ViewSort Option[] - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- start
Time number - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - time
Range number - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
.
- program_
text str - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- columns
Sequence[View
Column Args] - The column headers to show on the log view.
- default_
connection str - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- description str
- Description of the log view.
- end_
time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - name str
- Name of the log view.
- sort_
options Sequence[ViewSort Option Args] - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- start_
time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - time_
range int - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
.
- program
Text String - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- columns List<Property Map>
- The column headers to show on the log view.
- default
Connection String - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- description String
- Description of the log view.
- end
Time Number - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - name String
- Name of the log view.
- sort
Options List<Property Map> - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- start
Time Number - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - time
Range Number - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
.
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> - The column headers to show on the log view.
- Default
Connection string - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- Description string
- Description of the log view.
- End
Time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - Name string
- Name of the log view.
- Program
Text string - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- Sort
Options List<Pulumi.Signal Fx. Log. Inputs. View Sort Option> - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- Start
Time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - Time
Range int - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
. - Url string
- The URL of the log view.
- Columns
[]View
Column Args - The column headers to show on the log view.
- Default
Connection string - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- Description string
- Description of the log view.
- End
Time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - Name string
- Name of the log view.
- Program
Text string - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- Sort
Options []ViewSort Option Args - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- Start
Time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - Time
Range int - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
. - Url string
- The URL of the log view.
- columns
List<View
Column> - The column headers to show on the log view.
- default
Connection String - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- description String
- Description of the log view.
- end
Time Integer - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - name String
- Name of the log view.
- program
Text String - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- sort
Options List<ViewSort Option> - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- start
Time Integer - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - time
Range Integer - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
. - url String
- The URL of the log view.
- columns
View
Column[] - The column headers to show on the log view.
- default
Connection string - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- description string
- Description of the log view.
- end
Time number - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - name string
- Name of the log view.
- program
Text string - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- sort
Options ViewSort Option[] - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- start
Time number - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - time
Range number - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
. - url string
- The URL of the log view.
- columns
Sequence[View
Column Args] - The column headers to show on the log view.
- default_
connection str - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- description str
- Description of the log view.
- end_
time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - name str
- Name of the log view.
- program_
text str - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- sort_
options Sequence[ViewSort Option Args] - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- start_
time int - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - time_
range int - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
. - url str
- The URL of the log view.
- columns List<Property Map>
- The column headers to show on the log view.
- default
Connection String - The connection that the log view uses to fetch data. This could be Splunk Enterprise, Splunk Enterprise Cloud or Observability Cloud.
- description String
- Description of the log view.
- end
Time Number - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - name String
- Name of the log view.
- program
Text String - Signalflow program text for the log view. More info at https://developers.signalfx.com/docs/signalflow-overview.
- sort
Options List<Property Map> - The sorting options configuration to specify if the log view table needs to be sorted in a particular field.
- start
Time Number - Seconds since epoch. Used for visualization. Conflicts with
time_range
. - time
Range Number - From when to display data. Splunk Observability Cloud time syntax (e.g.
"-5m"
,"-1h"
). Conflicts withstart_time
andend_time
. - url String
- The URL of the log view.
Supporting Types
ViewColumn, ViewColumnArgs
- Name string
- Name of the log view.
- Name string
- Name of the log view.
- name String
- Name of the log view.
- name string
- Name of the log view.
- name str
- Name of the log view.
- name String
- Name of the log view.
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.