artifactory

package
v1.28.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 12 Imported by: 0

README

artifactory webhook

You need to configure to orginizations artifactory instance/s as detailed via the artifactory webhook documentation: https://www.jfrog.com/confluence/display/JFROG/Webhooks. Multiple webhooks may need be needed to configure different domains.

You can also add a secret that will be used by telegraf to verify the authenticity of the requests.

Events

The different events type can be found found in the webhook documentation: https://www.jfrog.com/confluence/display/JFROG/Webhooks. Events are identified by their domain and event. The following sections break down each event by domain.

Artifact Domain
Artifact Deployed Event

The Webhook is triggered when an artifact is deployed to a repository.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'repo' string
  • 'path' string
  • 'name' string

Fields:

  • 'size' int
  • 'sha256' string
Artifact Deleted Event

The Webhook is triggered when an artifact is deleted from a repository.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'repo' string
  • 'path' string
  • 'name' string

Fields:

  • 'size' int
  • 'sha256' string
Artifact Moved Event

The Webhook is triggered when an artifact is moved from a repository.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'repo' string
  • 'path' string
  • 'name' string

Fields:

  • 'size' int
  • 'source_path' string
  • 'target_path' string
Artifact Copied Event

The Webhook is triggered when an artifact is copied from a repository.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'repo' string
  • 'path' string
  • 'name' string

Fields:

  • 'size' int
  • 'source_path' string
  • 'target_path' string
Artifact Properties Domain
Properties Added Event

The Webhook is triggered when a property is added to an artifact/folder in a repository, or the repository itself.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'repo' string
  • 'path' string
  • 'name' string Fields
  • 'property_key' string
  • 'property_values' string (joined comma seperated list)
Properties Deleted Event

The Webhook is triggered when a property is deleted from an artifact/folder in a repository, or the repository itself.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'repo' string
  • 'path' string
  • 'name' string

Fields:

  • 'property_key' string
  • 'property_values' string (joined comma seperated list)
Docker Domain
Docker Pushed Event

The Webhook is triggered when a new tag of a Docker image is pushed to a Docker repository.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'repo' string
  • 'path' string
  • 'name' string
  • 'image_name' string

Fields:

  • 'size' string
  • 'sha256' string
  • 'tag' string
  • 'platforms' []object
    • 'achitecture' string
    • 'os' string
Docker Deleted Event

The Webhook is triggered when a tag of a Docker image is deleted from a Docker repository.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'repo' string
  • 'path' string
  • 'name' string
  • 'image_name' string

Fields:

  • 'size' string
  • 'sha256' string
  • 'tag' string
  • 'platforms' []object
    • 'achitecture' string
    • 'os' string
Docker Promoted Event

The Webhook is triggered when a tag of a Docker image is promoted.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'repo' string
  • 'path' string
  • 'name' string
  • 'image_name' string

Fields:

  • 'size' string
  • 'sha256' string
  • 'tag' string
  • 'platforms' []object
    • 'achitecture' string
    • 'os' string
Build Domain
Build Uploaded Event

The Webhook is triggered when a new build is uploaded.

Tags:

  • 'domain' string
  • 'event_type' string

Fields:

  • 'build_name' string
  • 'build_number' string
  • 'build_started' string
Build Deleted Event

The Webhook is triggered when a build is deleted.

Tags:

  • 'domain' string
  • 'event_type' string

Fields:

  • 'build_name' string
  • 'build_number' string
  • 'build_started' string
Build Promoted Event

The Webhook is triggered when a build is promoted.

Tags:

  • 'domain' string
  • 'event_type' string

Fields:

  • 'build_name' string
  • 'build_number' string
  • 'build_started' string
Release Bundle Domain
Release Bundle Created Event

The Webhook is triggered when a Release Bundle is created.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string

Fields:

  • 'release_bundle_name' string
  • 'release_bundle_size' string
  • 'release_bundle_version' string
  • 'jpd_origin' string
Release Bundle Signed Event

The Webhook is triggered when a Release Bundle is signed.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string

Fields:

  • 'release_bundle_name' string
  • 'release_bundle_size' string
  • 'release_bundle_version' string
  • 'jpd_origin' string
Release Bundle Deleted Event

The Webhook is triggered when a Release Bundle is deleted.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_size' string
  • 'release_bundle_version' string
  • 'jpd_origin' string
Release Bundle Distribution Domain
Release Bundle Distribution Started Event

The Webhook is triggered when Release Bundle distribution has started

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_size' string
  • 'release_bundle_version' string
  • 'status_message' string
  • 'transaction_id' string
  • 'edge_node_info_list' []object
    • 'edge_node_address' string
    • 'edge_node_name' string
  • 'jpd_origin' string
Release Bundle Distribution Completed Event

The Webhook is triggered when Release Bundle distribution has completed.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_size' string
  • 'release_bundle_version' string
  • 'status_message' string
  • 'transaction_id' string
  • 'edge_node_info_list' []object
    • 'edge_node_address' string
    • 'edge_node_name' string
  • 'jpd_origin' string
Release Bundle Distribution Aborted Event

The Webhook is triggered when Release Bundle distribution has been aborted.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_size' string
  • 'release_bundle_version' string
  • 'status_message' string
  • 'transaction_id' string
  • 'edge_node_info_list' []object
    • 'edge_node_address' string
    • 'edge_node_name' string
  • 'jpd_origin' string
Release Bundle Distribution Failed Event

The Webhook is triggered when Release Bundle distribution has failed.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_size' string
  • 'release_bundle_version' string
  • 'status_message' string
  • 'transaction_id' string
  • 'edge_node_info_list' []object
    • 'edge_node_address' string
    • 'edge_node_name' string
  • 'jpd_origin' string
Release Bundle Version Domain
Release Bundle Version Deletion Started EVent

The Webhook is triggered when a Release Bundle version deletion has started on one or more Edge nodes.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_size' string
  • 'release_bundle_version' string
  • 'status_message' string
  • 'transaction_id' string
  • 'edge_node_info_list' []object
    • 'edge_node_address' string
    • 'edge_node_name' string
  • 'jpd_origin' string
Release Bundle Version Deletion Completed Event

The Webhook is triggered when a Release Bundle version deletion has completed from one or more Edge nodes.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_size' string
  • 'release_bundle_version' string
  • 'status_message' string
  • 'transaction_id' string
  • 'edge_node_info_list' []object
    • 'edge_node_address' string
    • 'edge_node_name' string
  • 'jpd_origin' string
Release Bundle Version Deletion Failed Event

The Webhook is triggered when a Release Bundle version deletion has failed on one or more Edge nodes.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_size' string
  • 'release_bundle_version' string
  • 'status_message' string
  • 'transaction_id' string
  • 'edge_node_info_list' []object
    • 'edge_node_address' string
    • 'edge_node_name' string
  • 'jpd_origin' string
Release Bundle Destination Domain
Release Bundle Received Event

The Webhook is triggered when a Release Bundle was received on an Edge Node.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_version' string
  • 'status_message' string
  • 'jpd_origin' string
Release Bundle Delete Started Event

The Webhook is triggered when a Release Bundle deletion from an Edge Node completed.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_version' string
  • 'status_message' string
  • 'jpd_origin' string
Release Bundle Delete Completed Event

The Webhook is triggered when a Release Bundle deletion from an Edge Node completed.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_version' string
  • 'status_message' string
  • 'jpd_origin' string
Release Bundle Delete Failed Event

The Webhook is triggered when a Release Bundle deletion from an Edge Node fails.

Tags:

  • 'domain' string
  • 'event_type' string
  • 'destination' string
  • 'release_bundle_name' string

Fields:

  • 'release_bundle_version' string
  • 'status_message' string
  • 'jpd_origin' string

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArtifactCopiedEventJSON

func ArtifactCopiedEventJSON() string

func ArtifactDeletedEventJSON

func ArtifactDeletedEventJSON() string

func ArtifactDeployedEventJSON

func ArtifactDeployedEventJSON() string

func ArtifactMovedEventJSON

func ArtifactMovedEventJSON() string

func ArtifactPropertiesAddedEventJSON

func ArtifactPropertiesAddedEventJSON() string

func ArtifactPropertiesDeletedEventJSON

func ArtifactPropertiesDeletedEventJSON() string

func BuildDeletedEventJSON

func BuildDeletedEventJSON() string

func BuildPromotedEventJSON

func BuildPromotedEventJSON() string

func BuildUploadedEventJSON

func BuildUploadedEventJSON() string

func DestinationDeleteCompletedEventJSON

func DestinationDeleteCompletedEventJSON() string

func DestinationDeleteFailedEventJSON

func DestinationDeleteFailedEventJSON() string

func DestinationDeleteStartedEventJSON

func DestinationDeleteStartedEventJSON() string

func DestinationReceivedEventJSON

func DestinationReceivedEventJSON() string

func DistributionAbortedEventJSON

func DistributionAbortedEventJSON() string

func DistributionCompletedEventJSON

func DistributionCompletedEventJSON() string

func DistributionFailedEventJSON

func DistributionFailedEventJSON() string

func DistributionStartedEventJSON

func DistributionStartedEventJSON() string

func DockerDeletedEventJSON

func DockerDeletedEventJSON() string

func DockerPromotedEventJSON

func DockerPromotedEventJSON() string

func DockerPushedEventJSON

func DockerPushedEventJSON() string

func ReleaseBundleCreatedEventJSON

func ReleaseBundleCreatedEventJSON() string

func ReleaseBundleDeletedEventJSON

func ReleaseBundleDeletedEventJSON() string

func ReleaseBundleSignedEventJSON

func ReleaseBundleSignedEventJSON() string

func UnsupportedEventJSON

func UnsupportedEventJSON() string

Types

type ArtifactDeploymentOrDeletedEvent

type ArtifactDeploymentOrDeletedEvent struct {
	Domain string `json:"domain"`
	Event  string `json:"event_type"`
	Data   struct {
		Repo string `json:"repo_key"`
		Path string `json:"path"`
		Name string `json:"name"`
		Size int64  `json:"size"`
		Sha  string `json:"sha256"`
	} `json:"data"`
}

func (ArtifactDeploymentOrDeletedEvent) NewMetric

type ArtifactMovedOrCopiedEvent

type ArtifactMovedOrCopiedEvent struct {
	Domain string `json:"domain"`
	Event  string `json:"event_type"`
	Data   struct {
		Repo       string `json:"repo_key"`
		Path       string `json:"path"`
		Name       string `json:"name"`
		Size       int64  `json:"size"`
		SourcePath string `json:"source_repo_path"`
		TargetPath string `json:"target_repo_path"`
	} `json:"data"`
}

func (ArtifactMovedOrCopiedEvent) NewMetric

type ArtifactPropertiesEvent

type ArtifactPropertiesEvent struct {
	Domain string `json:"domain"`
	Event  string `json:"event_type"`
	Data   struct {
		Repo           string   `json:"repo_key"`
		Path           string   `json:"path"`
		Name           string   `json:"name"`
		Size           int64    `json:"size"`
		PropertyKey    string   `json:"property_key"`
		PropertyValues []string `json:"property_values"`
	}
}

func (ArtifactPropertiesEvent) NewMetric

func (e ArtifactPropertiesEvent) NewMetric() telegraf.Metric

type ArtifactoryWebhook

type ArtifactoryWebhook struct {
	Path   string
	Secret string
	// contains filtered or unexported fields
}

func (*ArtifactoryWebhook) NewEvent

func (awh *ArtifactoryWebhook) NewEvent(data []byte, et string, ed string) (Event, error)

func (*ArtifactoryWebhook) Register

func (awh *ArtifactoryWebhook) Register(router *mux.Router, acc telegraf.Accumulator, log telegraf.Logger)

type BuildEvent

type BuildEvent struct {
	Domain string `json:"domain"`
	Event  string `json:"event_type"`
	Data   struct {
		BuildName    string `json:"build_name"`
		BuildNumber  string `json:"build_number"`
		BuildStarted string `json:"build_started"`
	} `json:"data"`
}

func (BuildEvent) NewMetric

func (e BuildEvent) NewMetric() telegraf.Metric

type CommonFields

type CommonFields struct {
	Domain string `json:"domain"`
	Event  string `json:"event_type"`
}

type DestinationEvent

type DestinationEvent struct {
	Domain      string `json:"domain"`
	Event       string `json:"event_type"`
	Destination string `json:"destination"`
	Data        struct {
		Name    string `json:"release_bundle_name"`
		Version string `json:"release_bundle_version"`
		Message string `json:"status_message"`
	} `json:"data"`
	OriginURL string `json:"jpd_origin"`
}

func (DestinationEvent) NewMetric

func (e DestinationEvent) NewMetric() telegraf.Metric

type DistributionEvent

type DistributionEvent struct {
	Domain      string `json:"domain"`
	Event       string `json:"event_type"`
	Destination string `json:"destination"`
	Data        struct {
		EdgeNodeInfoList []struct {
			EdgeNodeAddress string `json:"edge_node_address"`
			EdgeNodeName    string `json:"edge_node_name"`
		} `json:"edge_node_info_list"`
		Name          string `json:"release_bundle_name"`
		Size          int64  `json:"release_bundle_size"`
		Version       string `json:"release_bundle_version"`
		Message       string `json:"status_message"`
		TransactionID int64  `json:"transaction_id"`
	} `json:"data"`
	OriginURL string `json:"jpd_origin"`
}

func (DistributionEvent) NewMetric

func (e DistributionEvent) NewMetric() telegraf.Metric

type DockerEvent

type DockerEvent struct {
	Domain string `json:"domain"`
	Event  string `json:"event_type"`
	Data   struct {
		Repo      string `json:"repo_key"`
		Path      string `json:"path"`
		Name      string `json:"name"`
		Size      int64  `json:"size"`
		Sha       string `json:"sha256"`
		ImageName string `json:"image_name"`
		Tag       string `json:"tag"`
		Platforms []struct {
			Architecture string `json:"achitecture"`
			Os           string `json:"os"`
		} `json:"platforms"`
	} `json:"data"`
}

func (DockerEvent) NewMetric

func (e DockerEvent) NewMetric() telegraf.Metric

type Event

type Event interface {
	NewMetric() telegraf.Metric
}

type ReleaseBundleEvent

type ReleaseBundleEvent struct {
	Domain      string `json:"domain"`
	Event       string `json:"event_type"`
	Destination string `json:"destination"`
	Data        struct {
		ReleaseBundleName    string `json:"release_bundle_name"`
		ReleaseBundleSize    int64  `json:"release_bundle_size"`
		ReleaseBundleVersion string `json:"release_bundle_version"`
	} `json:"data"`
	JpdOrigin string `json:"jpd_origin"`
}

func (ReleaseBundleEvent) NewMetric

func (e ReleaseBundleEvent) NewMetric() telegraf.Metric

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL