OutsideIT / FireMotD

:fire: Fire Framework Linux MoTD Generator :fire:
https://outsideit.net/firemotd
GNU General Public License v3.0
174 stars 44 forks source link

Advanced info only available through the 'Original' theme #127

Open Tontonitch opened 5 years ago

Tontonitch commented 5 years ago

Issue Type

Bug report

Issue Detail

Maybe I miss something, but the advanced info (Apache, MySQL, PHP, ...) only available through the 'Original' theme.

Expected Behavior

All the themes can produce the advanced info.

Actual Behavior

Only the theme Original produces the advanced info.

willemdh commented 5 years ago

@Tontonitch Well it depends on how the theme template is constructed.

As I wanted to separate the data generation from the theme templates, it's also possible you are using the default 'basic' data template.

Can you try to execute:

FireMotD -T Elastic -D all -S -d

Does FireMotD show all info afterwards?

FireMotD -T ELastic

I admit this should be doucmented a bit more. :) Maybe a 'getting started' menu or something would be good.

Tontonitch commented 5 years ago

I've tried the commands and don't get the expected results.

[root@drupaldbsrv1-d ~]# /root/FireMotD -T Elastic -D all -S -d
2018-08-29 15:37:56,897: FireMotD: Info: Debug mode
2018-08-29 15:37:56,905: FireMotD: Info: FireMotD action save started
2018-08-29 15:37:56,915: FireMotD: Info: Exportfile /usr/share/firemotd/data/FireMotD.json found, template type all
2018-08-29 15:37:56,922: FireMotD: Info: Template type set to all. Overwriting..
2018-08-29 15:37:56,939: FireMotD: Info: Looping through "/usr/share/firemotd/data/FireMotD.json" based on all template.
2018-08-29 15:37:56,953: FireMotD: Info: Exploring HostIp
2018-08-29 15:37:56,992: FireMotD: Info: Exploring Release
2018-08-29 15:37:57,034: FireMotD: Info: Exploring Kernel
2018-08-29 15:37:57,062: FireMotD: Info: Exploring Platform
2018-08-29 15:37:57,140: FireMotD: Info: Exploring InstallDate
2018-08-29 15:37:57,233: FireMotD: Info: Exploring Updates
2018-08-29 15:38:05,683: FireMotD: Info: Exploring Httpd
2018-08-29 15:38:05,776: FireMotD: Info: Exploring Nginx
2018-08-29 15:38:05,807: FireMotD: Info: Exploring Mysql
2018-08-29 15:38:05,868: FireMotD: Info: Exploring Postgres
2018-08-29 15:38:05,901: FireMotD: Info: Exploring Php
2018-08-29 15:38:06,007: FireMotD: Info: Exploring Elasticsearch
2018-08-29 15:38:08,398: FireMotD: Info: Exploring Logstash
2018-08-29 15:38:10,771: FireMotD: Info: Exploring Kibana
2018-08-29 15:38:13,325: FireMotD: Info: Updated ExportFile: /usr/share/firemotd/data/FireMotD.json
2018-08-29 15:38:13,334: FireMotD: Info: FireMotD action save finished
[root@drupaldbsrv1-d ~]# /root/FireMotD -T Elastic

The info returned by FireMotD are still the basic ones (I expect php, httpd and mysql info):

Info
Ip
Release
Kernel
Platform
Uptime
CPU Usage
CPU Load
Memory
Swap
Root
Updates
Sessions
Processes
willemdh commented 5 years ago

Mjah php, httpd and mysql is idem not in most of the themes. They should probabaly be added.

abrowndb commented 5 years ago

@willemdh With the latest version doesn't display APPs/V. Only Original theme displays any APPs that may be installed.

2019-02-06_14-03-20 2019-02-06_14-03-41

c250 commented 5 years ago

I had the same issue until I generated the cache for all templates. Try running a FireMotD -G all -d then try again.

willemdh commented 5 years ago

@c250 @abrowndb Regenerating the caches should help indeed. I'm not sure where it went wrong for you? The readme.md has been updated, see https://github.com/OutsideIT/FireMotD#generating-caches

As I'm using Ansible to distribute FireMotD, it's possible one of the other install methids (make / Install function) is missing something?

c250 commented 5 years ago

@willemdh I was using make to perform my installation. I had seen the generate cache option either here or on OutsideIT when I was first installing (I bounced between the two). I thought I had generated it, but I had some other, non-related, issues which caused me to remove my initial install and reinstall. Took me a bit to remember to do it, but the install was pretty straightforward. This is the test for my homelab and it will be deployed out to my other systems via ansible.

We have an older version installed at work and I will be looking to upgrade it (we deploy by ansible there as well) and I really appreciate the updated VMWare CPU sockets and core information. That will be very useful across our small shop. I appreciate the hard work and time you put in to this. It's a great overview when logging in and truly useful.

abrowndb commented 5 years ago

@willemdh I regenerated the cache on all templates multiple times.. Still no luck.

abrowndb commented 5 years ago

@willemdh Still the same scenario.. when running FireMotD -G all -d the "Apps" are not reflected and as well I'm noticing IP change is not reflected

c250 commented 5 years ago

@abrowndb I am by no means an expert having just gotten into deploying this and taking over systems with it already deployed on. However, are you seeing the categories and they are blank or are they not present at all?

In my instance, prior to generating the cache, I wasn't even seeing the categories (CPU Usage, CPU Load, Memory etc.) in the output. Once I generated the cache, they began to show. Are yours present and blank or not present at all?

You also need to save the data to the FireMotD.json file using FireMotd -S. Did you already set up the cron jobs as outlined in the walkthrough? I haven't dug through the code, @willemdh will be able to answer this far more accurately, but I don't think your IP change will go into effect until a new FireMotD -S is ran. If you have that in your cron correctly, it should be automatic after the next run which is randomized.