I need to capture file descriptors for a given process. This is simular to what collectd's processes plugin does, but need to get this on the fluentd, google-fluentd specifically rails.
I've added my plugin under /etc/google-fluentd/plugin directory and no luck, it is not getting registered. I've even moved under /opt/google-fluentd/embedded/lib/ruby/gems/2.6.0/gems/fluentd-1.7.4/lib/fluent/plugin still no luck. Out of desperation I have also tried renaming in_tail.rb to in_tail2.rb and tail plugin is gone.
2020-08-14 18:28:16 -0700 [error]: fluent/log.rb:362:error: config error file="/etc/google-fluentd/google-fluentd.conf" error_class=Fluent::ConfigError error="Unknown input plugin 'tail'. Run 'gem search -rd fluent-plugin' to find plugins"
Which tells me that there is some other place where plugin must be mentioned. Is it too naive to think that I can just write a single file plugin under /etc/google-fluentd/plugin?
After a few hours of going up and down the call stack in the fluentd trying to figure out the logic behind why and which plugins fluentd loads here is what I figured out.
#type has to match registration call and filename!
ie i had used
#type fc_count
my filename was
/etc/google-fluentd/in_fd.rb
with
Fluent::Plugin.register_input('fd_count', self)
Although type and registration matched, fluent couldn't match file path to plugin/in_fd.rb as it loads configuration. Basically if you don't use a plugin it won't load it and the way it determines it is by going through config. This is the reason why when I renamed an existing input plugin it was no longer found.
Related
I have a suite which has 50 test cases. When I execute my suite, I get all the failed screenshots listed in the project's folder. I want to point and store those screenshots to a different directory with the name of the test case. I wanted it to be a one time setup than doing it explicitly for every test cases.
There's quite a few ways to change the screenshots default directory.
One way is to set the screenshot_root_directory argument when importing Selenium2Library. See the importing section of Selenium2Library's documentation, and importing libraries in the user guide.
Another way is to use the Set Screenshot Directory keyword, which will do pretty much the same thing as specifying a path when importing the library. Though, using this keyword you can set the path to a new one whenever you like. For example, you could make it so that each test case could have it's own screenshot directory using this keyword. According to your question, this may be the best solution.
And finally, you may also post-process screenshots using an external tool, or even a listener, that would move all screenshots to another directory. Previously mentioned solutions are in most cases much better, but you still may want to do this in some cases, where say, the directory where you want screenshots to be saved would be created only after the tests have finished executing.
I suggest you to do the follow:
For new directory, you should put the following immediately after where you open a browser such:
Open Browser ${URL} chrome
Set screenshot directory ${OUTPUT FILE}${/}..${/}${TEST_NAME}${/}
For replace the screenshot name from the default to your own name, create the following keyword:
sc
Capture page screenshot filename=${SUITE_NAME}-{index}.png
Then, create another keyword and run it on Setup's test case:
Register Keyword To Run On Failure sc
In the above example, I created a new folder with the test case name, which create a screenshot (in case of failure) with the name of suite project name (instead of 'selenium-screenshot-1.png').
I've inherited an opencart 1.5.5.1 site and am completely new to the cms. From what I've been able to gather, it was built by a competent developer but then went through a hack-it-up development team, and then on to me. So, I really don't know what all to expect from it.
I currently have a module that is rendering in the left sidebar and I don't know why it's rendering there. The only file I can find in the file stack related at all to this "module" is a single template file within the catalog directory structure called:
/catalog/view/theme/mytheme/template/module/affiliate_profile_select.tpl
All of the other installed modules on the site seem to have lots of other files associated with them, whose locations are verified by the research I've done on creating opencart modules: ie, module files in the following directories:
/catalog/controller/module/
/catalog/language/english/module/
/catalog/model/module/
/catalog/view/theme/mytheme/template/module/
/admin/controller/module/
/admin/language/english/module/
/admin/model/module/
/admin/view/template/module/
From what I've been able to find though, this single file (affiliate_profile_select.tpl) is the only file in the file stack that is associated with this module.
I can't find anything related to this module, and/or file, inside any of the vqmod php or xml files.
I can't find anything related to this module in the admin area. I've tried searching through all of the installed modules for other generic identifiers (the section view is rendering at the very top of the left-sidebar on most non-logged-in pages, so I'm looking for layout locations of "Left Sidebar" and positions less than 2), but haven't found anything.
And yet, the section is obviously rendering on the site, so it has to be there somewhere. In fact, it's rendering in two places. It's also in the top-content section of the mobile view of the home page.
Right now it's almost feeling like it was a module that had been written, installed, and configured, and then someone deleted all but one of the files associated with the module. Could a situation like that happen?
Is there any way to track this issue down by querying the database? Or would the template inclusion obviously be inside a file somewhere and I just need to find it? To complicate matters, the hosting company doesn't allow remote login with a console (from what I can tell). Otherwise I'd just have run a grep for the filename in case someone had just thrown an "include()" statement in somewhere. The only place I've checked for something like that so far was in the left-sidebar template file:
/catalog/view/theme/default/template/common/column_left.tpl
but it's just a simple for-loop that echoes out the module views.
Any help or direction on how I might be able to track this problem down would be of significant help.
In Opencart, .tpl (template) files are always called by controllers which as you probably guessed are in catalog/controller/. An if it's a module (showing in left sidebar position, it's probably going to be in catalog/controller/module/. First order of business would be to find the controller that's calling the template you referred to. I'd probably start by getting into a shell and doing something like this from the site's docroot:
grep -r affiliate_profile_select .
From there you should be able to find the associated module controller and any other logic involved. Sometimes people use vQmod to add something on to a pre-existing module so that can possibly explain the lack of other similarly named files.
To tackle some touch-related problems I have written a script in app.js to reopen and enhance the EventDispatcher. The script is pretty long and contaminates the normally so clean app.js.
So I'd like to have my script in a seperate file and than somehow be imported in app.js. What in your opinion is the best (cleanest) way to do this?
FYI I'm using Ember CLI
I would place the script in file in in public/assets/js and load the script using Modernizr.load (Modernizr's implementation of yes nope) like this inside of script tags just before the closing body tag of your index.html file. In this situation, you could use Modernizr.touch to detect for touch event support on the user's device and, if present, load the touch polyfill/script.
Alternatively, place the file in the same place and load the script inside an if statement using $.getScript(url) in an initializer or the application view.
In both situations the script will not be imported into app.js but will still be loaded and ran.
I'm currently using the PuPHPet Vagrant config page. Once completed I then have to manually set a few other things up. This isn't ideal, and ideally PuPHPet will do it all in one go.
(1) I don't see the Apache mod_expires available in the options. I want to set this on puphpet.com somehow.
(2) I also currently have to edit this line in my Vagrantfile:
config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{folder['id']}", type: nfs
...and add this to the end:
, mount_options: ["dmode=777,fmode=777"]
It prevents Vagrant complaining of file permission problems in Symfony2.
I want Puphpet.com to handle that automatically too.
Is this possible?
I notice on https://puphpet.com/help that the section which mentions "Simply look inside your downloaded folder and open puppet/hieradata/common.yaml" may have something to do with it, but the folder I get after completing a config on puphpet.com doesn't have a common.yaml file in it.
The documentation is somewhat out of date, that file is now called config.yaml.
How to further configure it, say to tweak Apache settings (e.g. EnableSendfile Off), could use further elaboration on the tool's website. The project's lead commented on SO a couple months ago that updating the documentation was on his to-do list.
I am not a ColdFusion coder. Doing a favor for a friend who ported his CF site from a Windows server to Unix on GoDaddy.
Site is displaying error:
Cannot find CFML template for custom tag jstk. ColdFusion
attempted looking in the tree of installed custom tags but did not
find a custom tag with this name.
The site as I found it has at document root /CustomTags with the jstk.cfm file and a set of files in cf_jstk
My Googling located this:
You must store custom tag pages in any one of the following:
The same directory as the calling page;
The cfusion\CustomTags directory;
A subdirectory of the cfusion\CustomTags directory;
A directory that you specify in the ColdFusion Administrator
So I have:
Tried creating placing /CustomTags in /cfusion/CustomTags
Tried copying /cfusion/CustomTags to above document root
Tried copying jstk.cfm and subfolders into same directory as calling file(index.cfm)
Update: Per GoDaddy support I have also tried adding the following to no effect: <cfmodule template="CustomTags/jstk.cfm">
Can any one give me some tips on this or should I just tell my guy to look for a CF coder?
Thanks!
I don't know how GoDaddy is setup, so as a quick test, please do the following:
Create file test.cfm in the webroot with contents:
<cf_testtag/>
<cfoutput>test</cfoutput><cfabort/>
Create file testtag.cfm in the webroot with contents:
<cfdump var=#ThisTag# />
Then in a browser visit the test.cfm page.
You should get two debug dumps, followed by the 'test'; this will confirm that custom tags in general are working.
If that works move the testtag.cfm to the CustomTags directory, and see if you get the same behaviour or an error.
If this produces an error, for CF8 and above, you can add <cfset This.CustomTagPaths = "/CustomTags" /> inside the Application.cfc file (assuming there is a App cfc and not an Application.cfm) to ensure that directory is checked for tags.
It is possible to convert Application.cfm to Application.cfc - how easy this is depends on how complex the code is in there - might be something you could figure out, or might need an experienced CF dev, it depends.
Depending on the outcome of this, we can attempt to debug why the jstk tag isn't working (unless one of the above solves it).
In an effort to check the simple things before worrying about complex things:
Remember that filenames on *nix systems are case sensitive, but on windows are not.
For example, a windows server will pick up "application.cfm" but a linux server won't. It requires "Application.cfm".
Check to make sure all filenames/paths are the correct case.
Normally, CFML check every custom tags in current directory first, if not found, second is in CFMX8/customtags/.