All Projects → ops-itop → cmdbApi

ops-itop / cmdbApi

Licence: other
itop cmdb API

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Labels

Projects that are alternatives of or similar to cmdbApi

itop-datacenter-view
Extension for iTop: Easily manage & visualize your racks, enclosures and datacenter devices.
Stars: ✭ 24 (+84.62%)
Mutual labels:  cmdb, itop
itop-extensions
my extensions of itop
Stars: ✭ 27 (+107.69%)
Mutual labels:  cmdb, itop
itop FAQ
itop FAQ 中文常见问题列表
Stars: ✭ 20 (+53.85%)
Mutual labels:  cmdb, itop
Ansible Cmdb
Ansible-cmdb takes the output of Ansible's fact gathering and converts it into a static HTML overview page (and other things) containing system configuration information.
Stars: ✭ 2,003 (+15307.69%)
Mutual labels:  cmdb
Codo Cmdb
基于Tornado实现的一套资产管理系统、支持AWS、阿里云、腾讯云、华为云自动拉取资产信息等
Stars: ✭ 205 (+1476.92%)
Mutual labels:  cmdb
Glpi
GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
Stars: ✭ 2,278 (+17423.08%)
Mutual labels:  cmdb
assimilation-official
This is the official main repository for the Assimilation project
Stars: ✭ 47 (+261.54%)
Mutual labels:  cmdb
Cmdb
运维平台
Stars: ✭ 67 (+415.38%)
Mutual labels:  cmdb
onix
A reactive configuration manager designed to support Infrastructure as a Code provisioning, and bi-directional configuration management providing a single source of truth across multi-cloud environments.
Stars: ✭ 89 (+584.62%)
Mutual labels:  cmdb
Opsmanage
自动化运维平台: 代码及应用部署CI/CD、资产管理CMDB、计划任务管理平台、SQL审核|回滚、任务调度、站内WIKI
Stars: ✭ 2,849 (+21815.38%)
Mutual labels:  cmdb
Opendevops
CODO是一款为用户提供企业多混合云、一站式DevOps、自动化运维、完全开源的云管理平台、自动化运维平台
Stars: ✭ 2,990 (+22900%)
Mutual labels:  cmdb
Ewp oms
自动化运维系统(saltstack+django+bootstrap),QQ群342844540,博客http://ywzhou.blog.51cto.com
Stars: ✭ 211 (+1523.08%)
Mutual labels:  cmdb
iTop-CN
iTop in chinese
Stars: ✭ 36 (+176.92%)
Mutual labels:  cmdb
Fusioninventory For Glpi
FusionInventory plugin for GLPI
Stars: ✭ 241 (+1753.85%)
Mutual labels:  cmdb
inventoree
Inventoree leads you through the chaos of your infrastructure
Stars: ✭ 22 (+69.23%)
Mutual labels:  cmdb
Ralph
Ralph is the CMDB / Asset Management system for data center and back office hardware.
Stars: ✭ 1,701 (+12984.62%)
Mutual labels:  cmdb
cmdb
基于 python 3.7 + django 2.2.3 + AdminLTE-3.0.0-beta.1 实现的资产管理系统。
Stars: ✭ 50 (+284.62%)
Mutual labels:  cmdb
Chain
链喵 CMDB 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Stars: ✭ 240 (+1746.15%)
Mutual labels:  cmdb
syscmdb
syscmdb系统
Stars: ✭ 32 (+146.15%)
Mutual labels:  cmdb
introspector
A schema and set of tools for using SQL to query cloud infrastructure.
Stars: ✭ 61 (+369.23%)
Mutual labels:  cmdb

iTop API封装

二次封装iTop API便于调用

数据模型使用 https://github.com/annProg/itop-extensions

参数说明

参数 说明
type ip,app,server,url,domain,default等 (可以在config.php中定义config['map']来映射类型和对应的iTop类)
value 多个值用半角逗号分隔
rankdir dot图形方向, LR或者TB,默认TB
depth relation深度,默认app为1, ip, default等为3
direction 关联方向,up(依赖),down(影响),both(依赖和影响),默认为down
show 控制relation显示的iTop类,逗号分隔
hide 控制relation隐藏的iTop类,逗号分隔
filter 控制objects显示的类型,逗号分隔

示例

使用以下参数调用

public.php?type=ip&value=10.0.0.2&filter=Server&show=Server,Cluster,Rack,ApplicationSolution&direction=both&depth=2

查询IP10.0.0.2的服务器的关联关系,并且objects只显示Server类,relations类显示Server,Cluster,Rack,ApplicationSolution&direction,并且同时显示此服务器的上下游关联,关联深度只显示2级,返回类似如下结果

{
  "relations": {
    "Server::2::op.node.22": [
      {
        "key": "Cluster::3::op1"
      },
      {
        "key": "ApplicationSolution::54::op.appname"
      }
    ],
    "Cluster::3::op1": [
      {
        "key": "ApplicationSolution::53::op.monitor"
      }
    ],
    "Rack::11::土城4F.M1": [
      {
        "key": "Server::2::op.node.22"
      }
    ]
  },
  "objects": {
    "Server::2": {
      "code": 0,
      "message": "",
      "class": "Server",
      "key": "2",
      "fields": {
        "id": "2",
        "friendlyname": "op.node.22"
      }
    }
  },
  "code": 0,
  "message": "Scope: 1; Related objects: Server= 1",
  "imgurl": "http://cmdb.cn/chart/api.php?cht=gv:dot&chl=digraph+G..."
}

图片显示如下

部署方式建议

cmdbApi监听本地端口

server {
	listen      127.0.0.1:8090;
	access_log logs/cmdbapi.log main;
	root /opt/wwwroot/cmdb.xxx.cn/cmdbApi/web;

	include enable-php.conf;

	location / {
		index  index.html index.htm index.php;
	}

	location ~ /\.
	{
		deny all;
	}

}

cmdbApi画图依赖 chart接口,此接口用于将dot源码转换为图片

server {
	listen      127.0.0.1:8091;
	access_log logs/cmdbchart.log main;
	root /opt/wwwroot/cmdb.xxx.cn/chart/;

	include enable-php.conf;

	location / {
		index  index.html index.htm index.php;
	}

	location ~ /\.
	{
		deny all;
	}

}

在cmdb配置文件里做反向代理

upstream graphviz-api {
	server 127.0.0.1:8091;
}

upstream cmdb-pubapi {
	server 127.0.0.1:8090;
}

server {
	listen      80;
	server_name  cmdb.xxx.cn;
	access_log logs/cmdb.xxx.cn.log main;
	root /opt/wwwroot/cmdb.xxx.cn/web;

	include enable-php.conf;

	location / {
		index  index.html index.htm index.php;
	}
	
	location /data/ {
		deny all;
	}
	
	location ^~ /api/ {
		proxy_pass http://cmdb-pubapi/;
		proxy_set_header     X-Forwarded-For $proxy_add_x_forwarded_for;
	}

	location ^~ /chart/ {
		proxy_pass http://graphviz-api/;
	}
	location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
	{
		expires      30d;
	}

	location ~ .*\.(js|css)?$
	{
		expires      12h;
	}

	location ~ /\.
	{
		deny all;
	}

}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].