美文网首页
zabbixApi4j-Graph item

zabbixApi4j-Graph item

作者: 差不多先生_tl | 来源:发表于2018-01-11 11:37 被阅读21次

    Graph item

    graphitem.get: 检索图项目

    image.png
    GraphItemGetTest
    package cn.com.yeexun.testzabbix.zabbix4j.example.graphitem;
    
    import static org.junit.Assert.assertNotNull;
    
    import org.junit.Test;
    
    import cn.com.yeexun.testzabbix.zabbix4j.common.ZabbixApiTestBase;
    
    import com.zabbix4j.graphitem.GraphItemGetRequest;
    import com.zabbix4j.graphitem.GraphItemGetResponse;
    import com.zabbix4j.graphitem.GraphItemObject;
    
    
    /**
     * Created by Suguru Yajima on 2014/06/01.
     */
    public class GraphItemGetTest extends ZabbixApiTestBase {
    
    
        public GraphItemGetTest() {
            super();
        }
    
        @Test
        public void testGet1() throws Exception {
            GraphItemGetRequest request = new GraphItemGetRequest();
            GraphItemGetRequest.Params params = request.getParams();
    
            GraphItemGetResponse response = zabbixApi.graphItem().get(request);
            assertNotNull(response);
    
            logger.debug(getGson().toJson(response));
    
            GraphItemObject item = response.getResult().get(0);
            assertNotNull(item);
    
            assertNotNull(item.getCalc_fnc());
            assertNotNull(item.getColor());
            assertNotNull(item.getDrawtype());
            assertNotNull(item.getGitemid());
            assertNotNull(item.getGraphid());
            assertNotNull(item.getItemid());
            assertNotNull(item.getSortorder());
            assertNotNull(item.getType());
            assertNotNull(item.getYaxisside());
        }
    }
    
    

    相关文章

      网友评论

          本文标题:zabbixApi4j-Graph item

          本文链接:https://www.haomeiwen.com/subject/nvuznxtx.html