code.gitea.io/gitea@v1.21.7/contrib/gitea-monitoring-mixin/config.libsonnet (about)

     1  {
     2    _config+:: {
     3      local c = self,
     4      dashboardNamePrefix: 'Gitea',
     5      dashboardTags: ['gitea'],
     6      dashboardPeriod: 'now-1h',
     7      dashboardTimezone: 'default',
     8      dashboardRefresh: '1m',
     9  
    10      // please see https://docs.gitea.com/administration/config-cheat-sheet#metrics-metrics
    11      // Show issue by repository metrics with format gitea_issues_by_repository{repository="org/repo"} 5.
    12      // Requires Gitea 1.16.0 with ENABLED_ISSUE_BY_REPOSITORY set to true.
    13      showIssuesByRepository: true,
    14      // Show graphs for issue by label metrics with format gitea_issues_by_label{label="bug"} 2.
    15      // Requires Gitea 1.16.0 with ENABLED_ISSUE_BY_LABEL set to true.
    16      showIssuesByLabel: true,
    17  
    18      // Requires Gitea 1.16.0.
    19      showIssuesOpenClose: true,
    20  
    21      // add or remove metrics from dashboard
    22      giteaStatMetrics:
    23        [
    24          {
    25            name: 'gitea_organizations',
    26            description: 'Organizations',
    27          },
    28          {
    29            name: 'gitea_teams',
    30            description: 'Teams',
    31          },
    32          {
    33            name: 'gitea_users',
    34            description: 'Users',
    35          },
    36          {
    37            name: 'gitea_repositories',
    38            description: 'Repositories',
    39          },
    40          {
    41            name: 'gitea_milestones',
    42            description: 'Milestones',
    43          },
    44          {
    45            name: 'gitea_stars',
    46            description: 'Stars',
    47          },
    48          {
    49            name: 'gitea_releases',
    50            description: 'Releases',
    51          },
    52        ]
    53        +
    54        if c.showIssuesOpenClose then
    55          [
    56            {
    57              name: 'gitea_issues_open',
    58              description: 'Issues opened',
    59            },
    60            {
    61              name: 'gitea_issues_closed',
    62              description: 'Issues closed',
    63            },
    64          ] else
    65          [
    66            {
    67              name: 'gitea_issues',
    68              description: 'Issues',
    69            },
    70          ],
    71      //set this for using label colors on graphs
    72      issueLabels: [
    73        {
    74          label: 'bug',
    75          color: '#ee0701',
    76        },
    77        {
    78          label: 'duplicate',
    79          color: '#cccccc',
    80        },
    81        {
    82          label: 'invalid',
    83          color: '#e6e6e6',
    84        },
    85        {
    86          label: 'enhancement',
    87          color: '#84b6eb',
    88        },
    89        {
    90          label: 'help wanted',
    91          color: '#128a0c',
    92        },
    93        {
    94          label: 'question',
    95          color: '#cc317c',
    96        },
    97      ],
    98    },
    99  }