< Back

New-DDEvent

Sat Jan 18, 2020 8:13 pm

NAME New-DDEvent



SYNOPSIS

Post an event to the stream.





SYNTAX

New-DDEvent [-Title] <String> [-Text] <String> [[-Priority] <String>] [[-Hostname] <String>] [[-Tags] <String[]>]

[[-AlertType] <String>] [[-AggregationKey] <String>] [[-SourceTypeName] <String>] [<CommonParameters>]



New-DDEvent [-Title] <String> [-Text] <String> [[-TimestampHappened] <Double>] [[-Priority] <String>] [[-Hostname]

<String>] [[-Tags] <String[]>] [[-AlertType] <String>] [[-AggregationKey] <String>] [[-SourceTypeName] <String>]

[<CommonParameters>]



New-DDEvent [-Title] <String> [-Text] <String> [[-DateHappened] <DateTime>] [[-Priority] <String>] [[-Hostname]

<String>] [[-Tags] <String[]>] [[-AlertType] <String>] [[-AggregationKey] <String>] [[-SourceTypeName] <String>]

[<CommonParameters>]





DESCRIPTION





PARAMETERS

-Title <String>

The event title, limited to 100 characters.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Text <String>

The body of the event, limited to 4000 characters.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-DateHappened <DateTime>

Date object representing the date of the event, default is now. Not compatible with TimestampHappened.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-TimestampHappened <Double>

Posix timestamp of the event, default is now. Not compatible with DateHappened.



Required? false

Position? 3

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-Priority <String>

The priority of the event, can be 'normal' or 'low'. Default is 'normal'.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Hostname <String>

No need to set a default value here, the API does that for us



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Tags <String[]>

A list of tags to associate with the event, as string or array of strings



Required? false

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AlertType <String>

Severity of the event. Can be 'error', 'warning', or 'success'. Default is 'info'.



Required? false

Position? 7

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AggregationKey <String>

An arbitrary string to use for aggregation, max length of 100 characters. Default is None.

If you specify a key, all events using that key will be grouped together in the Event Stream.



Required? false

Position? 8

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SourceTypeName <String>

The type of event being posted. Can be 'nagios', 'hudson', 'jenkins', 'user', 'my_apps', 'feed',

'chef', 'puppet', 'git', 'bitbucket', 'fabric', 'capistrano'. Default is None.



Required? false

Position? 9

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\># Send an event with default options



New-DDEvent -Title 'A new event' -Text 'Something happened!'









-------------------------- EXAMPLE 2 --------------------------



PS C:\\># Send an event with custom options



New-DDEvent -Title 'A new event' -Text 'Something happened!' -Tags 'deploy' -AlertType 'Success'











RELATED LINKS

http://docs.datadoghq.com/api/?lang=console#events-post