LogoLogo
Tabnine websiteContact Sales
  • 👋Welcome
    • Overview
      • Architecture
        • Deployment options
      • Security
      • Privacy
      • Protection
        • Provenance and Attribution
      • Personalization
        • Tabnine’s Personalization in Depth
        • Connection: Global Codebase Awareness
      • AI Models
        • Tabnine's private and protected Universal models
        • Tabnine's fine-tuned AI models
      • Integrations
        • Atlassian Jira
      • System Requirements
      • Supported Languages
      • Supported IDEs
      • Tabnine Subscription Plans
        • Dev Preview
        • Dev
        • Pro
        • Enterprise (SaaS)
        • Enterprise (private installation)
    • Support & Feedback
  • 🚀Getting started
    • Install
      • Client setup (SaaS)
        • VS Code
          • Install Tabnine in VS Code
          • Activate Tabnine in VS Code
        • JetBrains IDEs
          • Install Tabnine in a JetBrains IDE
          • Activate Tabnine in a JetBrains IDE
        • Visual Studio
          • Install Tabnine in Visual Studio 2022
          • Activate Tabnine in Visual Studio 2022
        • Eclipse
          • Install Tabnine in Eclipse
          • Activate Tabnine in Eclipse
        • Sign in
          • Using an email
          • Using an authentication token
      • Client setup (private installation)
        • Join your team (private installation)
        • VS Code (private installation)
        • JetBrains IDEs (private installation)
        • Visual Studio (private installation)
        • Eclipse (private installation)
    • Quickstart Guide
      • Menus and Icons
    • Getting the Most from Tabnine Code Completions
      • Pause (snooze)
    • Getting the Most from Inline Actions
    • Getting the Most from Tabnine Chat
      • Launching Tabnine Chat
      • Interacting with Tabnine Chat
      • Reviewing suggestions
      • Writing prompts
      • Chat Context
        • Understanding Context
        • Jira Connection
        • Context Scoping
      • Conversing with Tabnine Chat
      • Switching between chat AI models
      • Image Prompts
      • Tabnine's Prompting Guide
        • Getting Started
        • Basic Prompting
          • Be specific and clear
          • Define the context
          • Start a fresh conversation as appropriate
          • Include necessary details
          • Ask for examples
          • Be concise but complete
  • 💪Software Development with Tabnine
    • Overview
    • Plan
    • Create
    • Test
      • Intro to the Test Agent
      • Test Agent Workflow
      • Custom Commands
      • Generate Test Files with @Mentions
    • Review
    • Fix
    • Document
    • Explain
    • Maintain
  • 🏭Administering Tabnine
    • Start a team
    • Manage a team
    • SaaS
      • Tabnine Pro team admin
        • Purchase Tabnine Pro
        • Adding and inviting users to Tabnine Pro
        • Assigning an admin role to a team member
        • Removing a team member
        • Tabnine Pro: Manage subscription and billing
        • Tabnine Pro - Change your payment method
        • Tabnine Pro - Change plan from monthly to annual
        • Unsubscribe from Tabnine Pro plan
      • Joining a Tabnine Pro team
      • Enterprise (SaaS) team admin
        • Set up a Tabnine Enterprise (SaaS) account
        • Invite team members
        • Manage your team
        • AI models for Chat (Enterprise SaaS)
      • Enterprise (SaaS) team member
        • Join your Tabnine team by invitation email (team member)
        • Join Tabnine team by link (member)
    • Private installation
      • Server setup guide
        • Kubernetes (MicroK8s) Installation guide
        • Deployment guide
          • Tabnine update guide
        • Air-gapped deployment guide
      • Admin guide
        • Monitoring Tabnine
        • Prometheus Operator install
        • Audit logs
      • Managing your team
        • Tabnine teams
        • Roles in an enterprise
        • Inviting users to your team
        • Deactivating and reactivating users
        • Deleting PII data of a deactivated user
        • Reset user's password
        • Usage reports
          • Reports Glossary
          • CSV-based reports (V2)
            • Configuring scheduled CSV reports
            • CSV-based reports V1 (Depracted since version 5.7.0
          • Usage API
        • Settings
          • General
          • Single Sign-On (SSO)
          • Personalization (f.k.a. Workspace)
            • Connecting to Remote Repositories
          • Email
          • License
          • Models
          • Access Tokens
        • IdP Sync
      • Release Notes
  • 📣Product Updates
    • What's new?
      • What's new? (August 2024)
      • What's new? (July 2024)
      • What's new? (June 2024)
      • What's new? (May 2024)
      • What's new? (April 2024)
      • What's new? (March 2024)
      • What's new? (February 2024)
      • What's new? (January 2024)
Powered by GitBook
On this page
  • Overview
  • Logs
  • Metrics
  • Prometheus example

Was this helpful?

  1. Administering Tabnine
  2. Private installation
  3. Admin guide

Monitoring Tabnine

Last updated 3 months ago

Was this helpful?

Overview

This document will go over how Tabnine services deployed on-premise can be monitored and go over a few examples of monitoring our services locally. You can also enable Tabnine telemetry, which uses the principles shown in this document and reports the data to Tabnine’s servers.

As Tabnine’s self-hosted solution runs in a Kubernetes cluster, we rely on standard tools for our logs and metrics - logs are written to the stdout, and metrics are exposed using http endpoints in Prometheus format.

Note that as both writing logs to stdout and exposing metrics endpoints for scraping are industry standards when working in the Kubernetes ecosystem, there is an extensive collection of tools and platforms that support those formats. This document will go over the configuration options for scrapping metrics and will also provide examples for setting up a simple server for scraping the metrics and for the collection of the logs into a centralized endpoint.

Logs

All Tabnine services output their logs to the stdout. They are picked by and managed by Kubernetes, which allows integration with standard tools for log management and retention.

In Kubernetes, the standard way to deal with logs is to run a collection service, such as or , which collects the logs from the pods and forwards them to a centralized location. Cloud providers usually have an official way of integrating the logs with their native logging platforms. However, they all use FluentD or FluentBit under the hood.

When Tabnine’s telemetry is enabled, we install and use FluentD to forward logs from the cluster to Tabnine’s servers.

Log messages are in the following format:

{
  "timestamp": "2023-01-15T03:46:06.861Z",
  "level": "error/warning/info/debug",
  "message": "msg content"
}

How to send logs to an external log management system

  • Cloud providers

  • 3rd party log management tools

Metrics

Enable monitoring of metrics

In order to enable Tabnine metrics monitoring, edit the following sections in values.yaml.

global:
  monitoring:
    enabled: true
    # labels -- by default. If your Promtheus server requires specific labels to be present for the monitors to be picked up, add them here
    labels: {}
    # annotations -- by default. Some platforms require specific annotations to be present, this setting will apply the annotation to all monitor objects
    annotations: {}
  tabnine:
    telemetry:
      # enabled -- Send telemetry data to Tabnine backend
      enabled: false

Now that values.yaml is updated, it is time to install the chart on the cluster.

helm upgrade --install -n tabnine --create-namespace tabnine oci://registry.tabnine.com/self-hosted/tabnine-cloud --values values.yaml

Prometheus example

Values file examples

The following example adds a release=prom-example label to all PodMonitors and ServiceMonitor created by Tabnine as part of the installation.

global:
  monitoring:
    enabled: true
    labels:
      release: prom-example
  image:
    imagePullSecrets:
      - name: regcred
  tabnine:
  [...]

Prometheus configuration file

The following configuration:

  1. Scrapes only PodMonitors and ServiceMonitors with a release=prom-example label,

  2. keeps the data for 14 days

  3. requires 50GB of storage

  4. requires 6G of RAM to operate

apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  name: prom-example
  namespace: monitoring
spec:
  evaluationInterval: 30s
  paused: false
  podMonitorNamespaceSelector: {}
  podMonitorSelector:
    matchLabels:
      release: prom-example
  portName: http-web
  probeNamespaceSelector: {}
  probeSelector:
    matchLabels:
      release: prom-example
  replicas: 1
  resources:
    limits:
      cpu: 1
      memory: 6G
    requests:
      cpu: 1
      memory: 6G
  retention: 14d
  routePrefix: /
  ruleNamespaceSelector: {}
  ruleSelector:
    matchLabels:
      release: prom-example
  scrapeInterval: 30s
  securityContext:
    fsGroup: 2000
    runAsGroup: 2000
    runAsNonRoot: true
    runAsUser: 1000
  serviceMonitorNamespaceSelector: {}
  serviceMonitorSelector:
    matchLabels:
      release: prom-example
  shards: 1
  storage:
    volumeClaimTemplate:
      spec:
        resources:
          requests:
            storage: 50Gi
  version: v2.42.0

Tabnine services export Prometheus metrics and rely on having Prometheus Operator installed on the cluster. If you are unfamiliar with how to install a Prometheus Operator please follow article.

for full list of available configurations, please check the

🏭
Prometheus
FluentBit
FluentD
FluentBit
GKE - Google’s Kubernetes Engine logs to StackDriver by default based on fluentbit, and it enabled by default
EKS - Amazon’s Elastic Kubernetes Service supports logging to CloudWatch both fluentbit and fluentd
AKS - Azure allows you to view live data with Container insights from Azure Kubernetes Service (AKS) clusters
NewRelic
Coralogix
Logz.io
Datadog
Prometheus Operator install
Prometheus (CRD) documentation