Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • N noc
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 452
    • Issues 452
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • noc
  • noc
  • Merge requests
  • !782

Rename managedobject BI address field.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Andrey Vertiprahov requested to merge fix-avs-bi-managedobject-ip-field into microservices May 31, 2018
  • Overview 1
  • Commits 2
  • Pipelines 2
  • Changes 2

Use this query on clickhouse for migrations table:

rename table managedobjects to managedobjects_old
CREATE TABLE noc.managedobjects ( date Date,  ts DateTime,  managed_object UInt64,  administrative_domain UInt64,  segment UInt64,  container UInt64,  level UInt16,  x Float64,  y Float64,  pool UInt64,  name String,  ip UInt32,  is_managed UInt8,  profile UInt64,  vendor UInt64,  platform UInt64,  version UInt64,  n_interfaces Int32,  n_subscribers Int32,  n_services Int32,  n_neighbors Int32,  n_links Int32,  nri_links Int32,  mac_links Int32,  stp_links Int32,  lldp_links Int32,  cdp_links Int32,  has_stp UInt8,  has_lldp UInt8,  has_cdp UInt8,  has_snmp UInt8,  has_snmp_v1 UInt8,  has_snmp_v2c UInt8) ENGINE = MergeTree(date, (managed_object, ts), 8192)

insert into noc.managedobjects select date as date, ts as ts, managed_object as managed_object, administrative_domain as administrative_domain, segment as segment, container as container, level as level, x as x, y as y, pool as pool, name as name, address as ip, is_managed as is_managed, profile as profile, vendor as vendor, platform as platform, version as version, n_interfaces as n_interfaces, n_subscribers as n_subscribers, n_services as n_services, n_neighbors as n_neighbors, n_links as n_links, nri_links as nri_links, mac_links as mac_links, stp_links as stp_links, lldp_links as lldp_links, cdp_links as cdp_links, has_stp as has_stp, has_lldp as has_lldp, has_cdp as has_cdp, has_snmp as has_snmp, has_snmp_v1 as has_snmp_v1, has_snmp_v2c as has_snmp_v2c from noc.managedobjects_old
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-avs-bi-managedobject-ip-field