I'm trying to write local checks for a Check_MK instance on a computer with OMD installed. I don't have admin rights on this machine, so I work as an OMD site like this:
sudo omd su $MY_SITE
And, like my standard user, the site user does not have admin rights either.
In the Check_MK documentation for writing agent-based checks I find that I have two options for doing this:
Editing /usr/bin/check_mk_agent, which is impossible with the rights I have or
Creating a script in /usr/lib/check_mk_agent/plugins/, which is also impossible because this folder is only writeable to root.
When I run cmk --paths I see that there's a folder for "locally installed agents and plugins" at $MY_SITE_HOME/local/share/check_mk/agents/. This folder has a subfolder named plugins. If I put a script in there, however, its output doesn't show up when I run check_mk -d localhost. It is set to be executable and it does produce valid output, as far as I can tell:
<<<helloworld>>>
Hello world!
Am I putting the script in the wrong folder? Is it necessary to have admin rights in order to write agent based checks in Check_MK?
One way of doing this without admin rights would have been to edit main.mk to include include a new datasource program. I would have liked to have a local folder that was analog to /usr/lib/check_mk_agent/plugins/, but it seems that this is not possible. I ended up having one of our admins give me the rights to /usr/lib/check_mk_agent/plugins/.
Related
My end goal: I want to fetch data from a retail site on an hourly schedule to see if a specific product is back in stock or not.
I tried using xpath in python to scrape the site myself, but I'm not too familiar, and why reinvent the wheel if someone built a scraper already? In this case, Diggernaut has a github repo.
https://github.com/Diggernaut/configs/tree/master/bananarepublic.gap.com
I'm using the above github repo to try and run a pre-existing web scraper on the banana republic retail site. All that's included in the folder is a config.yml file. I don't even know where to start to try and run it... I am not familiar with using .yml files at all, barely know my way around a terminal (I can do basic "ls" and "cd" and "brew install", otherwise, no idea).
Help! I have docker and git installed (not that I know how to use docker). I have a Mac version 10.13.6 (High Sierra).
I'm not sure why you're looking at using Docker for this, as the config.yml is designed for use on Diggernaut.com and not as part of a docker container deployment. In fact, there is no docker container for Diggernaut that exists as far as I can see.
On the main Github config page for Diggernaut they list the following instructions:
All configs can be used with Diggernaut service to retrieve products information.
You need to create free account at Diggernaut
Login to your account
Create a project with any name and description you want
Get into your new project by clicking it and create new digger with any name
Then you will see 3 options suggested to you, you need to use one where you will use meta-language
Config editor will open and you can simply copy and paste config code and click on save button.
Switch mode for digger from Debug to Active and then run your digger.
Wait for completion.
Download data.
Schedule your runs if required.
I often set java in system environment variable, which will make it accessible in windows cmd, but people won't always have admin access on their computer. When I set the Path environment variable under a specific account. I was not able to use java in windows cmd even if I log in as that account?
Why is it so? And how can I set append any thing to Path permanently without using admin access?
C:\Users\xxx>cygwin
'cygwin' is not recognized as an internal or external command,
operable program or batch file.
My bad, I put cygwin folder under my C:\cygwin, which will make it admin access. After I change the user control to full, it is able to load the cygwin.
So namely,
1. Put admin access program (like C:\Program Files) under your system variable
2. Put local access program (lizhi C:\users\xxx) under your user account variable.
Then it will work as expected.
Thanks
I'm totally newbie in Beanstalk. I'm developing a web application in which a sealed and black-box plugin is used. That plugin needs a physical path with full permission to use for cache.
Any solution?
You can use the .ebextensions files in the main project that will, for example, create a directory and change the access rights to it. It is not clear from your question how you install the plugin (e.g. is it a service that is loaded after the web application is installed or is it part of the web application).
Execute a command in the .ebextensions file such as in:
How to grant permission to users for a directory using command line in Windows?
You'll find a introduction into container customization in
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-windows-ec2.html
Be careful about the format of the files (ie. spaces, no tabs, the best is to edit it in a separate text editor). Experiment with simple commands first, so that you get the hang of how the commands are executed.
Note: The ebextensions commands are executed for each deployment, so your script should check if the directory exists already and only create it if it doesn't. Otherwise the execution will fail as you try to create a directory that exists already. In a second step you can add the permissions.
Recently had the pleasure of picking up a VPS over # DigitalOcean. It's a Ubuntu 14.04 running Rails + Nginx & Unicorn.
I wanted to work with Sublime, as I have locally, so I installed the commercial SFTP plugin. I was able to successfully gain remote access to my VPS, and I even downloaded the rails folder locally. Now is where it gets difficult though, and I need some help.
How I do I keep the local folder and the remote folder in sync?
Right clicking on the folder via Sublime offers some options like, sync Local -> Remote, which seems like what I want, except that every upload ends in failure (Permission denied).
Am I supposed to be doing this local to remote sync? Or am I off base here? If I'm on base, why do I get permission denied?
Probably, the user you're using for the SFTP connection has read permissions on the folder you're working on, but is not allowed to write.
For this reason, you were allowed to download your remote folder, but no longer allowed to write in it (upload).
You can check this by running ls -ld /path/to/rails/ and reading the first part (for example, it could be drwxr--r--). If needed, here you can learn more about file system permissions.
If it's a permission problem, you can solve it in different ways, but you should consider how each solution could impact the security and/or functionality of your application:
You could change the owner of the rails directory to match the Sublime SFTP user (see man chown), and ensure the owner of the rails user has write access on it (sudo chmod o+w /path/to/rails)
You could use a different user for Sublime SFTP access (one that has write permissions on the rails folder)
You could add the Sublime SFTP user to the group of the rails folder (useradd -G {group-name} username) and then grant the folder group write access (sudo chmod g+w /path/to/rails)
I recently installed cream onto a windows 7 laptop. I was installing the rails.vim plugin when tried to issue the :helptags ~/vim/docs command so I can have the rails helpfiles available.
I have since discovered that w7 doesn't allow user privileges in the program files directory so I haven't been able to add the helptags or use edit -> startup settings to change my vimfiles.
I found this thread here Allow access permission to write in Program Files of Windows 7 and a few websites referring to "ultimate windows tweaker" . Has anyone without third party software been able to get access rights for vim or cream on win7?
If you want to have access privileges to the vim folder, then you should rather try a portable version of vim (try gvimportable from http://www.portableapps.com).
The access control has been designed such that multiple users can share a software and not modify it.
As far as I know, on windows XP at least, you can put your vim files in your $HOME directory in a subdirectory called 'vimfiles'.
And you shoud have read/write access to that directory.
If you want to check where Vim is looking for config files in runtime, use
:echo &rtp
You should at least see the default system wide vim directory and your home directory.
If this is a personal install, you'd better put everything in your home.
Have you tried ?
:helptags $HOME/vimfiles/doc
There is a how-to here Take ownership Win 7 on how to grant user access to a folder and subfolders, which will allow me to set the ~/vim folder and subs to have write access.