Documentation ¶
Index ¶
- Constants
- Variables
- func ProvideGatherer() prometheus.Gatherer
- func ProvideGathererForTest(reg prometheus.Registerer) prometheus.Gatherer
- func ProvideRegisterer() prometheus.Registerer
- func ProvideRegistererForTest() prometheus.Registerer
- func SetBuildInformation(reg prometheus.Registerer, version, revision, branch string, ...)
- func SetEnvironmentInformation(reg prometheus.Registerer, labels map[string]string) error
- func SetPluginBuildInformation(pluginID, pluginType, version, signatureStatus string)
- type FrontendMetricEvent
- type FrontendMetricsRecorder
- type InternalMetricsService
- type PostFrontendMetricsCommand
Constants ¶
View Source
const ( // FolderID API GetAlerts string = "GetAlerts" GetDashboard string = "GetDashboard" RestoreDashboardVersion string = "RestoreDashboardVersion" GetFolderByID string = "GetFolderByID" GetFolderDescendantCounts string = "GetFolderDescendantCounts" SearchFolders string = "searchFolders" GetFolderPermissionList string = "GetFolderPermissionList" UpdateFolderPermissions string = "UpdateFolderPermissions" GetFolderACL string = "getFolderACL" Search string = "Search" GetDashboardACL string = "getDashboardACL" NewToFolderDTO string = "newToFolderDto" GetFolders string = "GetFolders" // FolderID services Folder string = "folder" Dashboard string = "dashboards" LibraryElements string = "libraryelements" LibraryPanels string = "librarypanels" NGAlerts string = "ngalert" Provisioning string = "provisioning" PublicDashboards string = "publicdashboards" AccessControl string = "accesscontrol" Guardian string = "guardian" DashboardImport string = "dashboardimport" )
View Source
const ExporterName = "grafana"
ExporterName is used as namespace for exposing prometheus metrics
Variables ¶
View Source
var ( // MInstanceStart is a metric counter for started instances MInstanceStart prometheus.Counter // MPageStatus is a metric page http response status MPageStatus *prometheus.CounterVec // MApiStatus is a metric api http response status MApiStatus *prometheus.CounterVec // MProxyStatus is a metric proxy http response status MProxyStatus *prometheus.CounterVec // MApiUserSignUpStarted is a metric amount of users who started the signup flow MApiUserSignUpStarted prometheus.Counter // MApiUserSignUpCompleted is a metric amount of users who completed the signup flow MApiUserSignUpCompleted prometheus.Counter // MApiUserSignUpInvite is a metric amount of users who have been invited MApiUserSignUpInvite prometheus.Counter // MApiDashboardSave is a metric summary for dashboard save duration MApiDashboardSave prometheus.Summary // MApiDashboardGet is a metric summary for dashboard get duration MApiDashboardGet prometheus.Summary // MApiDashboardSearch is a metric summary for dashboard search duration MApiDashboardSearch prometheus.Summary // MApiAdminUserCreate is a metric api admin user created counter MApiAdminUserCreate prometheus.Counter // MApiLoginPost is a metric api login post counter MApiLoginPost prometheus.Counter // MApiLoginOAuth is a metric api login oauth counter MApiLoginOAuth prometheus.Counter // MApiLoginSAML is a metric api login SAML counter MApiLoginSAML prometheus.Counter // MApiOrgCreate is a metric api org created counter MApiOrgCreate prometheus.Counter // MApiDashboardSnapshotCreate is a metric dashboard snapshots created MApiDashboardSnapshotCreate prometheus.Counter // MApiDashboardSnapshotExternal is a metric external dashboard snapshots created MApiDashboardSnapshotExternal prometheus.Counter // MApiDashboardSnapshotGet is a metric loaded dashboards MApiDashboardSnapshotGet prometheus.Counter // MApiDashboardInsert is a metric dashboards inserted MApiDashboardInsert prometheus.Counter // MAlertingResultState is a metric alert execution result counter MAlertingResultState *prometheus.CounterVec // MAlertingNotificationSent is a metric counter for how many alert notifications been sent MAlertingNotificationSent *prometheus.CounterVec // MAlertingNotificationSent is a metric counter for how many alert notifications that failed MAlertingNotificationFailed *prometheus.CounterVec // MDBDataSourceQueryByID is a metric counter for getting datasource by id MDBDataSourceQueryByID prometheus.Counter // LDAPUsersSyncExecutionTime is a metric summary for LDAP users sync execution duration LDAPUsersSyncExecutionTime prometheus.Summary // MRenderingRequestTotal is a metric counter for image rendering requests MRenderingRequestTotal *prometheus.CounterVec // MRenderingQueue is a metric gauge for image rendering queue size MRenderingQueue prometheus.Gauge // MAccessEvaluationCount is a metric gauge for total number of evaluation requests MAccessEvaluationCount prometheus.Counter // MAccessPermissionsCacheUsage is a metric counter for cache usage MAccessPermissionsCacheUsage *prometheus.CounterVec // MAccessSearchUserPermissionsCacheUsage is a metric counter for cache usage MAccessSearchUserPermissionsCacheUsage *prometheus.CounterVec // MPublicDashboardRequestCount is a metric counter for public dashboards requests MPublicDashboardRequestCount prometheus.Counter // MPublicDashboardDatasourceQuerySuccess is a metric counter for successful queries labelled by datasource MPublicDashboardDatasourceQuerySuccess *prometheus.CounterVec // MFolderIDsAPICount is a metric counter for folder ids count in the api package MFolderIDsAPICount *prometheus.CounterVec // MFolderIDsServicesCount is a metric counter for folder ids count in the services package MFolderIDsServiceCount *prometheus.CounterVec )
View Source
var ( // MDataSourceProxyReqTimer is a metric summary for dataproxy request duration MDataSourceProxyReqTimer prometheus.Summary // MAlertingExecutionTime is a metric summary of alert execution duration MAlertingExecutionTime prometheus.Summary // MRenderingSummary is a metric summary for image rendering request duration MRenderingSummary *prometheus.SummaryVec // MRenderingUserLookupSummary is a metric summary for image rendering user lookup duration MRenderingUserLookupSummary *prometheus.SummaryVec // MAccessPermissionsSummary is a metric summary for loading permissions request duration when evaluating access MAccessPermissionsSummary prometheus.Histogram // MSearchPermissionsSummary is a metric summary for searching permissions request duration MAccessSearchPermissionsSummary prometheus.Histogram // MAccessEvaluationsSummary is a metric summary for loading permissions request duration when evaluating access MAccessEvaluationsSummary prometheus.Histogram )
Timers
View Source
var ( // MAlertingActiveAlerts is a metric amount of active alerts MAlertingActiveAlerts prometheus.Gauge // MStatTotalDashboards is a metric total amount of dashboards MStatTotalDashboards prometheus.Gauge // MStatTotalFolders is a metric total amount of folders MStatTotalFolders prometheus.Gauge // MStatTotalUsers is a metric total amount of users MStatTotalUsers prometheus.Gauge // MStatTotalTeams is a metric total amount of teams MStatTotalTeams prometheus.Gauge // MStatActiveUsers is a metric number of active users MStatActiveUsers prometheus.Gauge // MStatTotalOrgs is a metric total amount of orgs MStatTotalOrgs prometheus.Gauge // MStatTotalPlaylists is a metric total amount of playlists MStatTotalPlaylists prometheus.Gauge // StatsTotalViewers is a metric total amount of viewers StatsTotalViewers prometheus.Gauge // StatsTotalEditors is a metric total amount of editors StatsTotalEditors prometheus.Gauge // StatsTotalAdmins is a metric total amount of admins StatsTotalAdmins prometheus.Gauge // StatsTotalActiveViewers is a metric total amount of viewers StatsTotalActiveViewers prometheus.Gauge // StatsTotalActiveEditors is a metric total amount of active editors StatsTotalActiveEditors prometheus.Gauge // StatsTotalActiveAdmins is a metric total amount of active admins StatsTotalActiveAdmins prometheus.Gauge // StatsTotalDataSources is a metric total number of defined datasources, labeled by pluginId StatsTotalDataSources *prometheus.GaugeVec // StatsTotalAnnotations is a metric of total number of annotations stored in Grafana. StatsTotalAnnotations prometheus.Gauge // StatsTotalAlertRules is a metric of total number of alert rules stored in Grafana. StatsTotalAlertRules prometheus.Gauge // StatsTotalRuleGroups is a metric of total number of alert rule groups stored in Grafana. StatsTotalRuleGroups prometheus.Gauge // StatsTotalDashboardVersions is a metric of total number of dashboard versions stored in Grafana. StatsTotalDashboardVersions prometheus.Gauge // StatsTotalLibraryPanels is a metric of total number of library panels stored in Grafana. StatsTotalLibraryPanels prometheus.Gauge // StatsTotalLibraryVariables is a metric of total number of library variables stored in Grafana. StatsTotalLibraryVariables prometheus.Gauge // StatsTotalDataKeys is a metric of total number of data keys stored in Grafana. StatsTotalDataKeys *prometheus.GaugeVec // MStatTotalPublicDashboards is a metric total amount of public dashboards MStatTotalPublicDashboards prometheus.Gauge // MStatTotalCorrelations is a metric total amount of correlations MStatTotalCorrelations prometheus.Gauge )
StatTotals
View Source
var FrontendMetrics map[string]FrontendMetricsRecorder = map[string]FrontendMetricsRecorder{}
FrontendMetrics contains all the valid frontend metrics and a handler function for recording events
View Source
var WireSet = wire.NewSet( ProvideService, ProvideRegisterer, ProvideGatherer, )
View Source
var WireSetForTest = wire.NewSet( ProvideService, ProvideRegistererForTest, ProvideGathererForTest, )
Functions ¶
func ProvideGatherer ¶
func ProvideGatherer() prometheus.Gatherer
func ProvideGathererForTest ¶
func ProvideGathererForTest(reg prometheus.Registerer) prometheus.Gatherer
func ProvideRegisterer ¶
func ProvideRegisterer() prometheus.Registerer
func ProvideRegistererForTest ¶
func ProvideRegistererForTest() prometheus.Registerer
func SetBuildInformation ¶
func SetBuildInformation(reg prometheus.Registerer, version, revision, branch string, buildTimestamp int64)
SetBuildInformation sets the build information for this binary
func SetEnvironmentInformation ¶
func SetEnvironmentInformation(reg prometheus.Registerer, labels map[string]string) error
SetEnvironmentInformation exposes environment values provided by the operators as an `_info` metric. If there are no environment metrics labels configured, this metric will not be exposed.
func SetPluginBuildInformation ¶
func SetPluginBuildInformation(pluginID, pluginType, version, signatureStatus string)
Types ¶
type FrontendMetricEvent ¶
FrontendMetricEvent a single metric measurement event
type FrontendMetricsRecorder ¶
type FrontendMetricsRecorder func(event FrontendMetricEvent)
FrontendMetricsRecorder handles the recording of the event, ie passes it to a prometheus metric
type InternalMetricsService ¶
func ProvideService ¶
func ProvideService(cfg *setting.Cfg, reg prometheus.Registerer) (*InternalMetricsService, error)
type PostFrontendMetricsCommand ¶
type PostFrontendMetricsCommand struct {
Events []FrontendMetricEvent `json:"events"`
}
PostPostFrontendMetricsCommand sent by frontend to record frontend metrics
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package graphitebridge provides a bridge to push Prometheus metrics to a Graphite server.
|
Package graphitebridge provides a bridge to push Prometheus metrics to a Graphite server. |
Click to show internal directories.
Click to hide internal directories.