2012年8月2日
摘要: 使用字段查找对照(field lookup) 字段查找对照的意思是我们可以通过去查找Splunk所导入数据之外的csv文件来把数据包含的字段信息进行扩展,从而获得更多的内容 例如,在上面的例子中,product_id的内容对我们来说并不直观,我们并不知道这些产品代码具体是什么? 这些信息并不存在于日志中 但是我们可以通过外部查找的方式获得。 我们先从官网下载一个product_lookup.csv.zip文件.下载并解压缩 @url http://docs.splunk.com/images/c/cb/Product_lookup.csv.zip进入对照表管理 在splunk... 阅读全文
posted @ 2012-08-02 10:26 himanhimao 阅读(4582) 评论(0) 推荐(0) 编辑
  2012年8月1日
摘要: splunk 搜索语法全文搜索 搜索框直接输入”搜索词“ purchase 查找匹配词”purchase“字段搜索 字段名=”搜索词“ source="Sampledata.zip:./apache3.splunk.com/access_combined.log" 查找数据来源为"Sampledata.zip:./apache3.splunk.com/access_combined.log"通配符搜索 source="Sameledata.zip:.apache*" 查找数据来源为apache开头的所有来源逻辑组合搜索 source= 阅读全文
posted @ 2012-08-01 17:50 himanhimao 阅读(12161) 评论(0) 推荐(0) 编辑
摘要: 开发环境 yaf开发环境建议 lamp,目前yaf的最新版本为2.1.18(建议使用),php version 5.3+ apache 必须开启rewrite模块 yaf框架是基于C扩展写的,调试起来相对麻烦。建议你的开发环境中,php.ini应如下配置:display_errors = onlog_errors = onhtml_errors = onerror_reporting= E_ERROR | E_WARNING | E_PARSE | E_NOTICE目录结构+ public //网站根目录 - index.php //入口文件 - .htaccess //重写规... 阅读全文
posted @ 2012-08-01 10:43 himanhimao 阅读(6388) 评论(0) 推荐(1) 编辑
摘要: splunk实例简介 splunk 是一个针对IT数据的数据引擎软件,这些IT数据来自于组成你的IT基础架构设施的各种应用程序,服务器,网络设备,等等。Splunk是一个强大和灵活的搜索分析引擎,通过收集和索引各种来源IT数据,你可以实时的对IT基础架构设施的任何地方发生的问题进行调查分析,故障检查,监控报警一级可视化报表展现。安装 操作系统 : Ubuntu 12.04 LTS splunk版本 : splunk-4.3.3cd /tmpwget -O splunk-4.3.3-128297-linux-2.6-amd64.deb 'http://www.splunk.com/pag 阅读全文
posted @ 2012-08-01 10:40 himanhimao 阅读(3546) 评论(0) 推荐(0) 编辑
  2012年4月23日
摘要: Returnstrueif thevalueis present in thelist, using===to test equality. UsesindexOfinternally, iflistis an Array.检测值是否在列表中出现过,如果出现返回true1 _.include([1, 2, 3], 3);2 => true源码:1 _.include = _.contains = function(obj, target) {2 var found = false;3 if (obj == null) return found;4 if (native... 阅读全文
posted @ 2012-04-23 21:27 himanhimao 阅读(551) 评论(0) 推荐(0) 编辑
摘要: A convenient version of what is perhaps the most common use-case formap: extracting a list of property values.很方便的为你提供一个获取列表值的方法1 var stooges = [{name : 'moe', age : 40}, {name : 'larry', age : 50}, {name : 'curly', age : 60}];2 _.pluck(stooges, 'name');3 => [" 阅读全文
posted @ 2012-04-23 21:20 himanhimao 阅读(488) 评论(0) 推荐(0) 编辑
摘要: Returnstrueif any of the values in thelistpass theiteratortruth test. Short-circuits and stops traversing the list if a true element is found. Delegates to the native methodsome, if present.如果列表中有一个真正的实体值出现,那么将返回true,别名some1 _.any([null, 0, 'yes', false]);2 => true源码: var any = _.some = _ 阅读全文
posted @ 2012-04-23 21:15 himanhimao 阅读(379) 评论(0) 推荐(0) 编辑
  2012年4月20日
摘要: Return the number of values in thelist.返回元素列表的长度1 _.size({one : 1, two : 2, three : 3});2 => 3源码:1 _.size = function(obj) {2 return _.isArray(obj) ? obj.length : _.keys(obj).length;3 }; 阅读全文
posted @ 2012-04-20 23:28 himanhimao 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Produces a new array of values by mapping each value inlistthrough a transformation function (iterator). If the nativemapmethod exists, it will be used instead. Iflistis a JavaScript object,iterator's arguments will be(value, key, list).所有的javascript对象元素都将经过回调函数作用1 _.map([1, 2, 3], function(num) 阅读全文
posted @ 2012-04-20 23:12 himanhimao 阅读(518) 评论(0) 推荐(0) 编辑
摘要: Iterates over alistof elements, yielding each in turn to aniteratorfunction. Theiteratoris bound to thecontextobject, if one is passed. Each invocation ofiteratoris called with three arguments:(element, index, list). Iflistis a JavaScript object,iterator's arguments will be(value, key, list). De 阅读全文
posted @ 2012-04-20 22:58 himanhimao 阅读(1273) 评论(0) 推荐(0) 编辑